debian10 修改系统语言

(1) 更新软件包列表 apt-get update

(2)安装locales包,apt-get install -y locales。安装完成后会自动生产/etc/locale.gen

(3) 去掉/etc/locale.gen文件中zh_CN.UTF-8所在行前面的注释,sed -i 's/^# *\(zh_CN.UTF-8\)/\1/' /etc/locale.gen
(4) 运行locale-gen命令
(5) 在~/.bashrc中设置LC_ALL、LANG、LANGUAGE
  echo "export LC_ALL=zh_CN.UTF-8" >> ~/.bashrc \
  echo "export LANG=zh_CN.UTF-8" >> ~/.bashrc \
  echo "export LANGUAGE=zh_CN.UTF-8" >> ~/.bashrc

(6) source ~/.bashrc

posted on 2020-11-25 11:27  冯亮  阅读(783)  评论(1编辑  收藏  举报

导航