- 查看当前语言包
locale
- 查看系统拥有语言包
locale -a
- 安装简体中文语言包
yum install kde-l10n-Chinese
- 安装glibc-common
解决初装的系统,如果输入 locale 查看系统字体编码,可能会出现报错
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
或者设置编码不完全时,会出现警告
LC_CTYPE: cannot change locale (UTF-8): No such file or directory
yum install glibc-common
- 设置中文版的字体编码
# vi /etc/profile.d/locale.sh
export LC_CTYPE=zh_CN.UTF-8
export LC_ALL=zh_CN.UTF-8
# vi /etc/locale.conf
LANG=zh_CN.UTF-8
# vi /etc/sysconfig/i18n
LANG=zh_CN.UTF-8
# vi /etc/environment
LANG=zh_CN.UTF-8
LC_ALL=zh_CN.UTF-8
- 重启系统
reboot
网友评论