CentOS6.8 Chinese/English environment switching tutorial illustration

I. Introduction

Those who are not accustomed to English may want to convert the system from English to Chinese; and those who consider that the Chinese directory may be garbled if the client is not configured correctly, they may prefer to convert the system from Chinese to English.

Switching Chinese to English actually means changing the value of LANG from zh_CN-UTF8 character set to en_US-UTF8 character set; similarly, switching from English to Chinese means changing the value of LANG from en_US-UTF8 to zh_CN-UTF8.

This article only uses switching from Chinese to English as an example.

2. Change the Chinese environment to the English environment

The current desktop is displayed as follows:

The user's home directory is displayed as follows:

2.1 Use locale to view the currently used encoding and character set

locale

2.2 Use locale -a to view the currently supported encoding and character set

locale -a | grep en_US #locale -a will output all encodings and character sets supported by the current system, so I use grep here to filter only en_US character set

You can see en_US.utf8. Be careful not to directly use the en_US.utf8 here in the next modification, but write it in the form of en_US.UTF-8, otherwise the modification will not take effect and the system will continue to use the original Chinese encoding.

2.3 Modify the LANG variable in /etc/profile

echo 'export LANG=en_US.UTF-8'>>/etc/profile #in/etc/profile last append
reboot  #Restart the operating system

2.4 Confirm to modify the folder from Chinese to English

Use the graphical interface to log in to the host, the rename confirmation interface appears, click OK

Three, description

3.1 Some tutorials say that you can directly execute export LANG=en_US.UTF-8, is this really feasible?

Answer: Not feasible. At least it is not feasible in my test. And from the principle point of view, this is an obvious way of dynamic modification, the impact can only be applied to the current session-and only the prompt information of the terminal has changed from Chinese to English, and the interface and directory are still in Chinese-leaving the current session or restarting the system and returning to the original Chinese too.

3.2 There is a tutorial saying that you can modify /etc/sysconfig/i18n, is this feasible?

Answer: According to the test on CentOS-6.8 and Redhat-6.5, the prompt in the terminal changed from Chinese to English in /etc/sysconfig/i18n, but the interface and directory cannot be changed to English. (But it seems that the /etc/sysconfig/i18n directory can be changed when English is changed to Chinese)

The test shows that /etc/profile has a higher priority than /etc/sysconfig/i18n.

3.3 Is the directory really changed from Chinese to English, for example, "Desktop" is really changed to "Desktop", and then the file originally in "Desktop" is changed to "Desktop"?

Answer: According to actual operation, "Desktop" and "Desktop" are two folders.

When the Chinese environment is set, the graphical interface displays the "Desktop" folder; when the English environment is set, the graphical interface displays the "Desktop" folder. The original files on the "Desktop" will not be automatically saved to "Desktop", but will be saved in " Desktop" folder.

to sum up

The above is the CentOS6.8 Chinese/English environment switching tutorial diagram introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message. The editor will reply to you in time. Thank you very much for your support to the ZaLou.Cn website!
If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!

Recommended Posts

CentOS6.8 Chinese/English environment switching tutorial illustration
Centos7.4 environment installation lamp-php7.0 tutorial
Build LEMP (Linux+Nginx+MySQL+PHP) environment under CentOS 8.1 (detailed tutorial)
CentOS6.7 build LNMP environment
Centos install MYSQL8.X tutorial
Hadoop environment construction (centos7)
Centos install elasticsearch tutorial
Centos7.6 build LNMP environment
lamp (centos7) installation lamp environment
Centos7 install kubernetes tutorial
Centos7 install Mysql8 tutorial
Centos6.9 install npm environment
Centos7 configure nodejs environment
Configure CentOS7 GPU environment
Linux CentOS 7 installation tutorial
CentOS 7 build LNMP environment
CentOS builds the K8S environment tutorial, a one-time success, collection!
[CentOS environment deployment] Java7/Java8 deployment under CentOS
Build docker environment under Centos6.5
CentOS 7 install JAVA environment (JDK 1.8)
Centos7 set up GitBook environment
CentOS 7.2 deploy Node.js development environment
CentOS install nginx+tomcat+java+mysql operating environment
Linux Centos7 install redis tutorial
vmware install CentOS 7 detailed tutorial
Centos6 set up GitBook environment
CentOS environment installation of Docker
5.1. CentOS@ install JDK1.8 graphic tutorial
Centos7 deploys python3 virtual environment
CentOS 7 yum install PHP7.3 tutorial
CentOS8 Linux 8.0.1905 installation process (illustration)
Install Mesos tutorial under CentOS7
CentOS8 deploys LNMP environment to compile and install mysql8.0.29 tutorial details