centos 8 设置中文环境
1.首先查看当前字符集
locale
2.看看有没有zh_CN.utf8
locale -a |grep CN
没有就安装中文配置
yum install -y langpacks-zh_CN
![]()

3.安装后配置环境
打开配置文件
vi /etc/locale.conf
LANG="en_US.UTF-8" 改为 LANG="zh_CN.UTF-8"
LANG="zh_CN.UTF-8"
4.重启系统
reboot





locale
locale -a |grep CN
没有就安装中文配置
yum install -y langpacks-zh_CN
![]()

打开配置文件
vi /etc/locale.conf
LANG="en_US.UTF-8" 改为 LANG="zh_CN.UTF-8"
LANG="zh_CN.UTF-8"
reboot




