centos6/7/8修改字符集 Linux教程



#  查看当前的字符集

echo $LANG;  

or 

locale


看看有没有zh_CN.utf8

locale -a |grep CN


CentOS7/8字符集配置文件在/etc/locale.conf;

CentOS6字符集配置文件在/etc/syscconfig/i18n;


yum -y groupinstall "fonts"

# CentOS8.x安装中文字符集 
yum install -y langpacks-zh_CN

# CentOS7.x安装中文字符集  
yum install kde-l10n-Chinese     
yum reinstall glibc-common

# CentOS6.x安装中文字符集
yum groupinstall chinese-support


vi /etc/locale.conf

LANG="zh_CN.UTF-8"
#LANG="en_US.UTF-8"

source /etc/locale.conf


# 修改系统语言环境,修改时区

echo 'LANG="zh_CN.UTF-8"' >> /etc/profile && source /etc/profile 

echo 'LANG="zh_CN.UTF-8"' >> /etc/locale.conf  && source /etc/locale.conf 


签名:这个人很懒,什么也没有留下!
最新回复 (0)
返回