How to set up the Chinese language for Linux is a problem that many friends encounter when starting to use Linux, that is, Chinese characters are garbled when the terminal enters command Echo. This usually occurs because the Chinese language pack is not installed or the default language is incorrect. Take centos as an example. how to view the language in Linux and how to modify the language? 1. view the current system language. log on to the linux system, open the operating terminal, and enter echo $ LANG.
How to set up the Chinese language for Linux is a problem that many friends encounter when starting to use Linux, that is, Chinese characters are garbled when the terminal enters command Echo. This usually occurs because the Chinese language pack is not installed or the default language is incorrect. Taking centos as an example, how to view and modify the language in Linux
1.View the current system language
Log on to the linux operating terminal and enterEcho $ LANGYou can view the currently used system language. For example
2.View installed language packs
Check whether a Chinese language pack is available on the terminal.LocaleCommand. if zh cn is available, the Chinese language has been installed.
3.What if there is no Chinese language?
You can download and install the Chinese language pack from the Internet.Yum groupinstall chinese-support
After installation
Enter the locale command
4.How to change the system language to Chinese
1. temporarily change language
If you just temporarily change the language environment of the linux system, you can set the LANG = language name by entering, such as Chinese is a zh_CN.UTF-8
2.Modify system default language
The above method is to modify and set the default language configuration of the system.
Such as vI/etc/sysconfig/i18n(Restart the system after modification)
5.Other considerations
If you still cannot set the Chinese language according to the above settings, pay attention to the encoding selected by your link terminal.
For example, xshell selects terminal encoding.Chinese or UTF8You can.