centos7 设置中文

查看系统版本
[root@webtest76 ~]# cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core)


[root@localhost ~]# cat /etc/locale.conf
LANG=en_US.UTF-8
[root@localhost ~]# cp /etc/locale.conf /etc/locale.conf_bak
[root@localhost ~]# vim /etc/locale.conf # 修改后原英文错误信息会变成中文信息
LANG="zh_CN.GB18030"
LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
SUPPORTED="zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="lat0-sun16"

or [root@localhost ~] localectl set-locale LANG=zh_CN.UTF-8
[root@localhost ~]# reboot # 重新系统

[root@webtest76 ~]# vi /etc/sysconfig/i18n # 如果默认安装的是中文的系统,i18n的内容如下:
LANG="zh_CN.UTF-8"
SYSFONT="latarcyrheb-sun16"
SUPPORTED="zh_CN.UTF-8:zh_CN:zh"

[root@webtest76 ~]# echo $LANG # 查看当前使用的系统语言
zh_CN.UTF8
[root@localhost ~]# export LANG=zh_CN.UTF8 # 将系统语言临时设置为中文,export方式不需要重新登录
[root@webtest76 ~]# ll
总用量 712504


# yum install kde-l10n-Chinese # centos 7以下版本使用以下命令安装 yum groupinstall chinese-support
# yum install bitmap-fonts bitmap-fonts-cjk

 

posted @ 2015-12-29 20:32  weiokx  阅读(3479)  评论(0编辑  收藏  举报