CentOS6.8 Chinese/English environment switching tutorial diagram

CentOS6.8 Chinese/English environment switching tutorial diagram

1. Introduction

People who are not used to English may want to change the system from English to Chinese; while people who consider that if the client is not configured correctly, the Chinese directory may be displayed as garbled characters may prefer to change the system from Chinese to English.

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

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

2. Change the Chinese environment to the English environment

The current desktop display is 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 currently supported encodings and character sets

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 the en_US character set 

You can see en_US.utf8. Be sure to note that in the next step of modification, do not directly use en_US.utf8 here 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 #Add reboot to the end of /etc/profile #Restart the operating system

2.4 Confirm to change the folder from Chinese to English

Log in to the host using the graphical interface, and the rename confirmation interface will appear. Click Confirm.

3. Description

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

Answer: Not feasible. At least from what I've tested, it's not feasible. In principle, this is an obvious dynamic modification method, and the impact can only act on the current session - and only the prompt information of the terminal changes from Chinese to English, the interface and directory remain in Chinese - exiting the current session or restarting the system will change back to the original Chinese.

3.2 Some tutorials say that /etc/sysconfig/i18n can be modified. Is this feasible?

Answer: According to tests on CentOS-6.8 and Redhat-6.5, modifying /etc/sysconfig/i18n changes the prompt in the terminal from Chinese to English, but the interface and directory cannot be changed to English. (However, it seems that when converting from English to Chinese, you can change it by modifying the /etc/sysconfig/i18n directory)

According to the test, /etc/profile has a higher priority than /etc/sysconfig/i18n.

3.3 Does the directory really change from Chinese to English? For example, does "Desktop" really change to "Desktop", and do the files originally on the "Desktop" move to the "Desktop"?

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

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

Summarize

The above is the illustrated tutorial on switching the Chinese/English environment of CentOS6.8 introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • CentOS 7 switching boot kernel and switching boot mode explanation
  • Example of switching between ordinary user and root user in CentOS command line
  • Install CentOS in VirtualBox to realize automatic mouse switching and copy and paste functions

<<:  6 ways to implement the maximum and minimum values ​​of an array in javascript

>>:  Detailed analysis and testing of SSD performance issues in MySQL servers

Recommend

Use Visual Studio Code to connect to the MySql database and query

Visual Studio Code is a powerful text editor prod...

js to realize automatic lock screen function

1. Usage scenarios There is such a requirement, s...

MySQL Series 3 Basics

Table of contents Tutorial Series 1. Introduction...

A complete list of commonly used HTML tags and their characteristics

First of all, you need to know some characteristi...

mysql5.7.18 decompressed version to start mysql service

The decompressed version of mysql5.7.18 starts th...

Docker data management and network communication usage

You can install Docker and perform simple operati...

MySQL character set garbled characters and solutions

Preface A character set is a set of symbols and e...

MySQL master-slave replication delay causes and solutions

Table of contents A brief overview of the replica...

Summary of common commands in Dockerfile

Syntax composition: 1 Annotation information 2 Co...

mysql5.7.17.msi installation graphic tutorial

mysql-5.7.17.msi installation, follow the screens...

Detailed explanation of Vue3 life cycle functions and methods

1. Overview The so-called life cycle function is ...

Detailed tutorial on running Tomcat in debug mode in IDEA Maven project

1. Add the following dependencies in pom.xml <...

How to install mysql via yum on centos7

1. Check whether MySQL is installed yum list inst...