ubuntu终端改为中文系统语言

1.安装简体中文语言包

sudo apt-get install language-pack-zh-hans language-pack-zh-hans-base

2.安装程序依赖语言包

sudo apt-get install `check-language-support -l zh`

3.设置本地语言为中文

sudo localectl set-locale LANG=zh_CN.UTF-8

4.重启系统

sudo reboot

5.检查系统本地语言

locale

显示如下即为中文生效

LANG=zh_CN.UTF-8
LANGUAGE=
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=