一、Ubuntu的中文乱码问题
sudo apt-get install language-pack-zh-hans
LANG="zh_CN.UTF-8"
LANGUAGE="zh_CN:zh:en_US:en"
三、修改/var/lib/locales/supported.d/local(没有这个文件就新建,同样在末尾追加):
en_US.UTF-8 UTF-8
zh_CN.UTF-8 UTF-8
zh_CN.GBK GBK
zh_CN GB2312
四、支持中文
sh> locale-gen 'zh_CN.UTF-8'
sh> update-locale LC_ALL="zh_CN.UTF-8"
五、修改/etc/profile
# language
#update-locale LC_ALL="zh_CN.UTF-8"
#locale-gen 'zh_CN.UTF-8'
#MY_LANG=en_US.UTF-8
#MY_LANG=zh_CN.UTF-8
MY_LANG=zh_CN.utf8
export LC_ALL=${MY_LANG}
export LANG=${MY_LANG}
export LANGUAGE=${MY_LANG}
六、执行命令并重启reboot:
sudo locale-gen