locale - get locale-specific information : locale |grep LANG
bash
中文UTF-8: export LANG="zh_CN.UTF-8"
英文UTF-8: export LANG="en_US.UTF-8"
code
用戶權限編輯~/.bashrc
文件orm
echo 'LANG="en_US.UTF-8"' >> ~/.bashrc source ~/.bashrc
Root權限編輯/etc/profile
文件ci
echo 'LANG="en_US.UTF-8"' >> /etc/profile source /etc/profile
CentOS7.x
Root權限編輯/etc/locale.conf
文件並保存,而後從新登陸終端。
echo 'LANG="en_US.UTF-8"' > /etc/locale.conf
CentOS5.x
Root權限編輯/etc/sysconfig/i18n
文件並保存,而後從新登陸終端。
echo 'LANG="en_US.UTF-8"' > /etc/sysconfig/i18n
get
~/.bashrc
> /etc/profile
> /etc/locale.conf
,/etc/sysconfig/i18n
io