Method: 1. Use the "vi /etc/sysconfig/i18n" command to set the "LANG" item content, and modify the language globally after restarting; 2. Use the export command to temporarily modify the language, the syntax is "export LANG=" language"".
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
Modify the default language of the Linux system:
1. Global modification:
All users have the same unified language setting
Modify the /etc/sysconfig/i18n file
vi /etc/sysconfig/i18n
If you want to modify it to Chinese, change it to LANG="zh_CN.UTF-8"
If you want to modify it into English, change it to LANG="en_US.UTF-8"
After saving, restart the computer to take effect
2. Changes made by a single user will not affect different users
Method: Copy /etc/sysconfig/i18n to the home directory of the user you want to change
[shengjk@localhost ~]$ cp /etc/sysconfig/i18n ~/.i18n
If you want to change it to Chinese, change it to LANG="zh_CN.UTF-8"
If you want to change it to English, change it to LANG="en_US.UTF-8"
After saving, restart the computer to take effect
3. Temporary modification in the terminal
Directly in Execute in the terminal:
export LANG="zh_CN.UTF-8" #中文 export LANG="en_US.UTF-8" #英文
Note: /etc/sysconfig/i18n stores the regional language settings of the system. i18n is the abbreviation of internationalization. There are exactly 18 letters between i and n
Related recommendations: "Linux Video Tutorial"
The above is the detailed content of How to modify the language in linux. For more information, please follow other related articles on the PHP Chinese website!