01 CentOS 7.6 switch system language

Foreword: Linux [cloud server] (https://cloud.tencent.com/product/cvm?from=10680) switched from CentOS 6.5 to CentOS 7.6

Many things on CentOS 7 are different from 6. Before changing the Chinese environment, this file was generally used: /etc/sysconfig/i18n. The file in CentOS 7 still exists, but the content in the file is empty.

Manually write the following content, the system language is still English:

# LANG="en_US.UTF-8"
LANG="zh_CN.UTF-8"
SYSFONT="latarcyrheb-sun16"

Therefore, to summarize the method on CentOS 7:

1、 Check the current locale##

locale -a    #View language packs owned by the system
echo $LANG    #Check current locale
locale    #List more detailed language information

zh_CN.UTF-8 is simplified Chinese, this is the same as above 6. If there is no zh_CN.UTF-8, you need to install the Chinese package

2、 Install language pack##

yum install kde-l10n-Chinese    #installation
locale -a|grep zh_CN    #Check to confirm

3、 Set Chinese locale##

3.1 Temporary modification, settings will be lost after restarting the server###

LANG="zh_CN.UTF-8"    #Modified to Chinese
LANG="en_US.UTF-8"    #Modified to English

3.2 Permanently modify, write the configuration into the file

vi /etc/locale.conf
# LANG=en_US.UTF-8    #You can directly remove the comment when switching later
LANG=zh_CN.UTF-8

4、 Restart the system to modify successfully!

shutdown -r now

Quote:

https://blog.csdn.net/xiaoxiaoyu_2008/article/details/81044579

Recommended Posts

01 CentOS 7.6 switch system language
centos system management
CentOS7.5-1804 system kernel upgrade
CentOS system startup process
VirtualBox install CentOS system
Centos7 modify the system language to simplified Chinese
Centos7.2 system optimization original
Centos system process management
Centos various time [system time/hardware time]
CentOS system optimization script, unfinished
Centos7 system commonly used commands
Install docker on Centos system
Centos system modify time zone
Centos backend system setup record
Centos6 system boot loading process
Linux centos system boot process
CentOS 6.X system initialization script
CentOS 7 configure Java language development environment
CentOS 8 (2)
CentOS 7 configure Ruby language development environment
CentOS 7 configure php language development environment
CentOS 7.X system installation and optimization
CentOS 8 (1)
CentOS7.2 install lepus database monitoring system
Install Centos7 operating system in Docker
001. Installation of enterprise-level CentOS7.6 operating system
CentOS 7 configure Python language development environment
[Switch] CentOS7 64-bit installation mysql tutorial
CentOS 7 system installation and configuration graphic tutorial
Graphic KVM to install CentOS7.6 operating system
CentOS7 installs IT asset management system Snipe-IT
CentOS7 system increase swap operation method example
CentOS7 build FastDFS distributed file system (on)
Linux kernel compilation and CentOS system installation
Centos7.6 operating system installation and optimization record
Install mysql8.0.13 version under Linux CentOS7 system
CentOS7 system yum way to install MySQL5.7
IP address problem after restarting CentOS 7 system
CentOS7 build FastDFS distributed file system (below)