Ubuntu修改系统语言为英文可支持中文

简单来说,就行修改/etc/default/locale文件,设置语言位UTF-8,如果没有这个语言,就执行命令locale-gen en_US.UTF-8进行安装,没有即时生效的话就重启。

查看当前系统语言

locale

修改系统语言

例如修改语言为英文

vi /etc/default/locale
LANG="en_US.UTF-8"
LANGUAGE="en_US:en"

重启后,再次查看系统语言

locale

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

查看系统内安装的locale

locale -a 

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
POSIX
zh_CN.utf8
zh_SG.utf8

没装en_US.UTF-8

locale-gen en_US.UTF-8

再次查看

LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
posted @ 2018-06-26 12:40  crxis  阅读(1577)  评论(0编辑  收藏  举报
友情链接:OIER博客 800兆技术 每日基金 AtCoder题解 tinywebdb Jupyter BZOJ