Allen_Jeo

Allen_Jeo

將終端語言更改為中文的Ubuntu

Note: The author used Ubuntu 20.4 version for testing#


一、Check if the Chinese language pack is installed#

locale -a

If zh_CN.utf8 is available, ignore the second step#


If not, please execute the following command#

sudo apt-get install language-pack-zh-hans -y  # Install Chinese language pack
locale-gen zh_CN.UTF-8 # Add support

二、Modify the configuration file#

The configuration file is located at /etc/default/locale, so use vim to modify it#

vim /etc/default/locale

Then modify the content to the following#

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

三、Restart#

reboot

Link to this article: 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

Please indicate the original article address when reposting.#

載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。