linux常用命令---中英文设置
中英文设置
LANG变量
echo $LANG---------查看当前编码
locale -----------------设置之后可查看详细信息
中文设置
# vim /etc/profile.d/locale.sh
export LC_CTYPE=zh_CN.UTF-8
export LC_ALL=zh_CN.UTF-8
# vim /etc/locale.conf
LANG=zh_CN.UTF-8
# vim /etc/sysconfig/i18n
LANG=zh_CN.UTF-8
# vim /etc/environment
LANG=zh_CN.UTF-8
LC_ALL=zh_CN.UTF-8
英文设置
# vim /etc/profile.d/locale.sh
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# vim /etc/locale.conf
LANG=en_US.UTF-8
# vim /etc/sysconfig/i18n
LANG=en_US.UTF-8
# vim /etc/environment
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8