Cygwin Chinese support (solve ls-l garbled)

Source: Internet
Author: User
Tags ssh

My premise is that the installation completed display Chinese is normal, but the use of ls-l when garbled:

The code is as follows Copy Code
### shows Chinese normal
Rock@rock-pc/cygdrive/d/wampserver
$ net start sshd
The CYGWIN sshd service is starting.
CYGWIN sshd Service has started successfully.

### ls-l problem
ROCK@ROCK-PC ~
$ ls-l
? The meat. 0

1. Add the following code at the end of the. bash_profile file in the user directory (CD ~):

The code is as follows Copy Code
Export Lc_all=en_us. UTF-16
Export Lc_ctype=en_us. UTF-16
Export Lang=en_us. UTF-16
Export xmodifiers= @im =CHINPUT3
Stty Cs8-istrip
Stty PASS8
Export Lesscharset=latin1

2. The same is the directory, remove the comments on the code in the. inputrc file (front #)

The code is as follows Copy Code
Set Meta-flag on
Set Convert-meta off
Set Input-meta on
Set Output-meta on

This completes and then exits SSH and restarts the Cygwin sshd service through the Windows service.

In addition, if you want to customize some shortcut commands, or the ~ directory,. bashrc file Add code

  code is as follows copy code

# Browse Catalog Color
Alias ls= ' ls--color--show-control-chars '
# Direct web directory
Alias web= ' cd/cygdrive/d/wampserver '
linux  cygwi N, SSH, software

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.