Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to switch between Chinese and English environments in CentOS6.8

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the CentOS6.8 Chinese / English environment how to switch, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to know about it.

I. Preface

Those who are not accustomed to English may want to change the system from English to Chinese, while those who consider that if the client is not configured correctly, the Chinese directory may show garbled code may prefer to convert the system from Chinese to English.

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

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

II. Change the Chinese environment to the English environment

The current desktop is displayed as follows:

The user's home directory is shown as follows:

2.1 use locale to view currently used encodings and character sets

Locale

2.2 use locale-a to view currently supported encodings and character sets

Locale-a | grep en_US # locale-an outputs all the encodings and character sets supported by the current system, so I use grep here to filter only the character sets of en_US

You can see that there is en_US.utf8. Be sure to note that in the next step of the revision, do not directly use the en_US.utf8 here but write it in en_US.UTF-8 form, otherwise the system will continue to use the original Chinese code if the modification does not take effect.

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 to restart the operating system

2.4 confirm to change the folder from Chinese to English

Log in to the host with a graphical interface, and the renaming confirmation interface appears, and click OK.

III. Explanation

3.1There are tutorials that directly implement export LANG=en_US.UTF-8. Is this really feasible?

A: it is not feasible. At least according to my test, it's not feasible. And in principle, this is an obvious way of dynamic modification, and the impact can only work on the current session-- and only the terminal prompt has changed from Chinese to English. The interface and directory are still Chinese-leaving the current session or restarting the system back to the original Chinese.

3.2 there are tutorials that say you can modify / etc/sysconfig/i18n. Is this feasible?

A: according to the CentOS-6.8 and Redhat-6.5 tests, the prompt in the modified / etc/sysconfig/i18n terminal has changed from Chinese to English, and the interface and directory cannot be changed into English. (however, it seems that the / etc/sysconfig/i18n directory can be changed when English is converted to Chinese.)

Tests show that / etc/profile takes precedence over / etc/sysconfig/i18n.

Is the directory really changed from Chinese to English, for example, is it really "desktop" to "Desktop", and then the original "desktop" files to "Desktop"?

Answer: according to the actual operation, "desktop" and "Desktop" are two folders.

When set to the Chinese environment, the graphical interface displays the "desktop" folder; when setting up the English environment, the graphical interface displays the "Desktop" folder. Files originally on the desktop will not be automatically saved to the "Desktop", but will be saved in the "desktop" folder.

Thank you for reading this article carefully. I hope the article "how to switch between CentOS6.8 Chinese and English environments" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report