#查看时区
ubuntu@ubuntu:~$ echo $LANG
en_US.UTF-8
ubuntu@ubuntu:~$ cat /etc/default/locale
LANG=en_US.UTF-8
ubuntu@ubuntu:~$ sudo apt install language-pack-zh-han* -y
#编辑文件sudo vim /etc/default/locale输入以下内容:
LANG=“zh_CN.UTF-8”
LANGUAGE=“zh_CN:zh”
LC_NUMERIC=“zh_CN"ip
LC_TIME=“zh_CN”
LC_MonETARY=“zh_CN”
LC_PAPER=“zh_CN”
LC_NAME=“zh_CN”
LC_ADDRESS=“zh_CN”
LC_TELEPHONE=“zh_CN”
LC_MEASUREMENT=“zh_CN”
LC_IDENTIFICATION=“zh_CN”
LC_ALL=“zh_CN.UTF-8”
保存退出:wq
#编辑环境文件
sudo vim /etc/environment
在最后添加以下内容;
PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
LANG=“zh_CN.UTF-8”
LANGUAGE=“zh_CN:zh”
LC_NUMERIC=“zh_CN”
LC_TIME=“zh_CN”
LC_MonETARY=“zh_CN”
LC_PAPER=“zh_CN”
LC_NAME=“zh_CN”
LC_ADDRESS=“zh_CN”
LC_TELEPHONE=“zh_CN”
LC_MEASUREMENT=“zh_CN”
LC_IDENTIFICATION=“zh_CN”
LC_ALL=“zh_CN.UTF-8”
#重新启动生效:
ubuntu@ubuntu:~$ sudo reboot
#查看
ubuntu@ubuntu:~$ echo $LANG
zh_CN.UTF-8
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)