Allen_Jeo

Allen_Jeo

ubuntu更换终端语言为中文

注:作者使用的是 Ubuntu 20.4 版本进行测试#


一、查看是否已安装中文语言包#

locale -a

如果有 zh_CN.utf8 那么忽略第二步#


如果没有请执行下面命令#

sudo apt-get install language-pack-zh-hans -y  #安装中文语言包
locale-gen zh_CN.UTF-8 #添加支持

二、修改配置文件#

### 配置文件位于 /etc/default/locale , 所以使用 vim 进行修改

vim /etc/default/locale

然后修改为一下内容#

LANG="zh_CN.UTF-8"
LANGUAGE="zh_CN:zh:en_US:en"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_IDENTIFICATION="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_ALL=zh_CN.UTF-8

三、重启#

reboot

本文地址:https://z-r.cc/2021/08/20/ubuntu%E6%9B%B4%E6%8D%A2%E7%BB%88%E7%AB%AF%E8%AF%AD%E8%A8%80%E4%B8%BA%E4%B8%AD%E6%96%87.html

搬运请注明原文地址#

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.