以下设置中文的方法适合ubuntu、debian系统。
先进到系统终端里执行:
apt-get update
更新软件源后执行:
apt-get install language-pack-zh*
用来获取中文语言包,然后再执行以下指令:
echo "\nexport LANG='zh_CN.UTF-8'" >> ~/.bashrc
echo "export LANGUAG='zh_CN.UTF-'" >> ~/.bashrc
echo "export LC_ALL='zh_CN.UTF-'" >> ~/.bashrc
. ~/.bashrc
最后执行:locale
看到以下一段即表明成功了。
LANG=zh_CN.UTF-8
LANGUAGE=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=zh_CN.UTF-8