linux设置中文字符

186 阅读1分钟

安装中文语言包

yum -y groupinstall chinese-support

设置字符集(临时)

export LANG="zh_CN.UTF-8"    # 中文 
export LANG="en_US.UTF-8"    # 英文

永久生效

vim /etc/sysconfig/i18n

LANG="zh_CN.UTF-8"

or vim /etc/profile

export LANG="zh_CN.UTF-8"
source /etc/profile