How to display Chinese Characters in Linux terminal and Shell
Source: Internet
Author: User
Article Title: how to display Chinese Characters in Linux terminal and Shell. Linux is a technology channel of the IT lab in China. Includes desktop applications, Linux system management, kernel research, embedded systems, open source, and other basic classification methods 1:
Modify the/etc/sysconfig/i18n File
Change LANG = "en_US" to GB2312.
You do not need to restart the machine.
# LANG = "GB2312"
Then you can.
The i18n modification is only valid for restart.
The method that takes effect immediately is the one I wrote.
Method 2:
# Vi ~ /. Bash_profile
LANG = zh_CN.GB18030
LANGUAGE = zh_CN.GB18030: zh_CN.GB2312: zh_CN
Export LANG LANGUAGE
In this way, you can enter and display Chinese characters on the terminal, and the original Chinese characters in the shell script also solve the garbled problem.
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