Cygwin is an excellent software for simulating Linux environment under Windows!
By default, most of cygwin's commands do not support Chinese, such as ls, the display is a question mark
but we can modify it to support Chinese
>
First, go to the user's home directory
$cd ~
and find .inputrc, if not, create a new
example:
1. Add the following code at the end of cygwin/home/[user]/.bash_profile
alias ls=’ls –color –show-control-chars’
export LC_ALL= zh_CN.GB23122
export LC_CTYPE=zh_CN.GB2312
export LANG=zh_CN.GB2312
export XMODIFIERS="@im=Chinput"3
Stty cs8 -istrip
stty pass8
export LESSCHARSET=latin1
2. Modify the code in cygwin/home/[user]/.inputrc and remove the relevant comments.
set meta-flag on
set convert-meta off
set output-meta on
set input-meta on
3. Add
at the end of cygwin/home/[user]/.bashrc. The above steps solve the problem of garbled Chinese input in cygwin.
Online A lot of solutions, set the environment to zh_CN.GB23122, but I tried it or not, and then set en_US.UTF-8, nano can edit the text, but save the file name is Chinese but not, finally en_US.UTF- 16 is OK, but there is still a problem I don't understand, export LESSCHARSET=latin1 I don't know what it means, who can tell me.
If you change the path of the home, please refer to the following method:
If the HOME directory changes, you need to edit cygwin.bat
Add the set HOME= before the bash command. C:\\cygwin\\home
$ more cygwin.bat
@echo off
C:
chdir C:\\cygwin\\bin
set HOME=C:\\cygwin\\home
bash –login -i
aaronvox#aaronvox ~
$ pwd
/home
The configuration file after this operation might be:
aaronvox#aaronvox ~
$ ls -a
. .. .bash_profile .bashrc .inputc .inputrc
aaronvox#aaronvox ~
$ more .inputc
set meta-flag on
set convert-meta o
Set output-meta on
set input-meta on
aaronvox#aaronvox ~
$ more .bash_profile
# base-files version 3.4-2
# WARNING
#
# IF THIS .bash_profile IS MODIFIED IT WILL NOT BE UPDATED BY THE CYGWIN
# SETUP PROGRAM. IT BECOMES YOUR RESPONSIBILITY .
#
# The latest version as installed by the Cygwin Setup program can
# always Be found at /etc/defaults/etc/skel/.bash_profile
# ~/.bash_profile: executed by bash for login shells.
# source the system wide bashrc if it exists
if [ -e /etc/bash.bashrc ] ; then
source /etc/bash.bashrc
fi
# source the users bashrc if it Owner
if [ -e "${HOME}/.bashrc" ] ; then
source "${HOME}/.bashrc"
fi
# Set PATH so it includes user’s private bin if it exists
# if [ -d "${HOME}/bin" ] ; then
# PATH= ${HOME}/bin:${PATH}
# fi
# Set MANPATH so it includes users’ private man if it exists
# if [ -d " ;${HOME}/man" ]; then
# MANPATH=${HOME}/man:${MANPATH}
# fi
# Set INFOPATH so it Includes users’ private info if it exists
# if [ -d "${HOME}/info" ]; then
# INFOPATH=${HOME}/info:${INFOPATH }
# fi
Since you have made the above changes, you can support Chinese!
When reading apue, the shared storage area is not used for instance. For this reason, I wrote a smal
I am a Linux rookie like many people, but it is very interested in this, not toss is not good; I dow
CentOS modify IP address First turn off the firewall: service iptables stop# ifconfig eth0 192.168.1
1. In STM32, there are five clock sources, HSI, HSE, LSI, LSE, PLL. 1, HSI is a high-speed internal
Mount command: Linux external storage media mounting method
Linux VMware (virtual machine) can not automatically obtain the IP address (solution)
Installing ies4linux under Linux using online banking
Monitor website logs under Linux command line
CentOS 6.X Installation Guide With Screenshots
Configure dual NIC routing table
Getting Started with Linux Programming - Threading
How to burn the system CD: Burning the operating system CD method tutorial
Easy to use SSD installed system 3 ways
How to quickly open the login information display of Win10
Win7 system desktop icon unreasonable big solution
Remote Management Tool PsTools Management Computer
How to install Win7's own virtual machine
Windows10 simple restore point creation method Windows10 restore point how to create
Win10 Preview Edition Edge Browser How to Install Lastpass Password Manager