Linux Chinese display settings

Source: Internet
Author: User
Tags i18n

Linux Chinese display settings

1.1 Viewing the currently used character set

1.1.1 Viewing the current character set (language) used by the system

Lang
Echo $LANG
en_US. UTF-8

1.1.2 Modifying the system's character set (language)

Lang=zh_cn. UTF-8

LANG PS1 Linux environment variable (can be used in any corner of Linux)
Export LANG=ZH_CN. UTF-8

1.1.3 When modifying environment variables, add export before

Echo $LANG
Zh_cn. UTF-8

1.1.4 viewing the current character set (language) used by the system

#LANG

Echo $LANG

en_US. UTF-8

1.2 Temporary modification of the system's character set (language)

Lang=zh_cn. UTF-8

LANG PS1 Linux environment variable (can be used in any corner of Linux)

Export. UTF-8

#修改环境变量的时候前面加上 Export

Echo $LANG

Zh_cn. UTF-8

1.3 Permanently modify the system's character set

cat/etc/sysconfig/i18n

Lang= "en_US. UTF-8 "

Sysfont= "Latarcyrheb-sun16"

Cp/etc/sysconfig/i18n/etc/sysconfig/i18n.bak

Sed-i ' S#en_us#zh_cn#g '/etc/sysconfig/i18n

cat/etc/sysconfig/i18n

Lang= "ZH_CN. UTF-8 "

Sysfont= "Latarcyrheb-sun16"

1.3.1 Effective

Source/etc/profile

Echo $LANG

Zh_cn. UTF-8

1.4 Linux inside Display garbled

Linux inside Display Chinese garbled
A Linux system uses a character set that differs from the Xshell software's character set.
Echo $LANG
1. Troubleshooting
1) Check the character set of the Linux system
Echo $LANG
2) View the character set used by Xshell
2. Resolve
Modifying the system's character set
First milestone-View the character set currently used by the system
#LANG
Echo $LANG
en_US. UTF-8
Second milestone-temporarily modify the system's character set
Lang=zh_cn. UTF-8
# # #LANG PS1 Linux environment variable (can be used in any corner of Linux)
Export LANG=ZH_CN. UTF-8
Add export before modifying environment variables
Echo $LANG
Zh_cn. UTF-8
Third milestone-permanently modify the system's character set
cat/etc/sysconfig/i18n
Lang= "en_US. UTF-8 "
Sysfont= "Latarcyrheb-sun16"
Cp/etc/sysconfig/i18n/etc/sysconfig/i18n.bak
Sed-i ' S#en_us#zh_cn#g '/etc/sysconfig/i18n
cat/etc/sysconfig/i18n
Lang= "ZH_CN. UTF-8 "
Sysfont= "Latarcyrheb-sun16"
3. Entry into force
Source/etc/profile
Echo $LANG
Zh_cn. UTF-8


This article is from the "Heyong" blog, make sure to keep this source http://heyong.blog.51cto.com/13121269/1954903

Linux Chinese display settings

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.