Home  >  Article  >  Operation and Maintenance  >  How to change linux English to Chinese

How to change linux English to Chinese

WBOY
WBOYOriginal
2022-03-11 11:57:289315browse

How to change Linux English to Chinese: 1. Download the Chinese language pack; 2. Use the "vim /etc/sysconfig/i18n" command to change "LANG=en_US.UTF-8" in the file to "LANG=zh_CN.UTF-8"; 3. Use the reboot command to restart.

How to change linux English to Chinese

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

How to change English to Chinese in Linux

1. First check whether the current system has a Chinese language pack

locale -a

If there is no zh_CN.utf8, you need Download the Chinese language pack, otherwise, if there is a Chinese language pack, skip the second step.

2. Install the Chinese language pack

Ubuntu:

sudo apt-get install language-pack-zh-hans

CentOS:

yum groupinstall chinese-support

Then check whether it is through locale -a Download completed.

3. Modify the configuration file

(1)Ubuntu:

sudo vim /etc/default/locale

Modify it to the following content:

LANG="zh_CN.utf8"
LANGUAGE="zh_CN:zh"
LC_ALL="zh_CN.utf8"

( 2)CentOS:

CentOS6.5:

vim /etc/sysconfig/i18n

CentOS7:

vim /etc/locale.conf

Change the inside:

LANG=en_US.UTF-8

to:

LANG=zh_CN.UTF-8

4. Restart

reboot

Among them, the above CentOS commands are all performed under root privileges.

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of How to change linux English to Chinese. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn