How to set the Chinese language of the Linux system? Many friends will encounter a problem when they start using Linux, that is, when the terminal input command is echoed, the Chinese characters are displayed as garbled characters. This situation usually occurs because the Chinese language pack is not installed, or there is a problem with the default language set. Today we will take centos as an example to learn how to check the language and set up methods to modify the language using Linux. Please see the following introduction for details.
1. How to check and set the system language package in Linux
1. Check the current system language
After logging in to the Linux system and opening the operating terminal, Enter echo$LANG to view the currently used system language. Such as
2. Check the installed language package
To check whether there is a Chinese language package, you can enter the locale command in the terminal. If there is zhcn, it means that Chinese has been installed. Language
3. What if there is no Chinese language
You can download and install the Chinese language package yumgroupinstallchinese-support from the Internet (if you cannot connect to the Internet, download and upload it from other computers) Go up)
2. How to modify the system language to Chinese
1. Temporarily change the language
If you only temporarily change the Linux system Language environment, you can set LANG=language name by inputting it, for example, Chinese is
Zn_CN.UTF-8 (note that this is originally Chinese, I temporarily set it to English
2. Modify the system default language
The above is the detailed content of How to set the Chinese language in Linux? Solution to Chinese garbled characters in centos. For more information, please follow other related articles on the PHP Chinese website!