环境

  • 系统:Windows 10 Pro ×64
  • 子系统:Ubuntu 20.04 LTS

安装语言包

$ sudo apt install language-pack-zh-hans

设置 locale

$ sudo vi /etc/locale.gen

找到 zh_CN.UTF-8 UTF-8 并取消注释,然后保存并退出

...
# zh_CN.GBK GBK
zh_CN.UTF-8 UTF-8
# zh_HK BIG5-HKSCS
...

编译语言

$ sudo locale-gen
Generating locales (this might take a while)...
  en_US.UTF-8... done
  zh_CN.UTF-8... done
  zh_SG.UTF-8... done
Generation complete.

设置默认语言为中文

$ sudo vi /etc/default/locale

将内容修改为

LANG=zh_CN.UTF-8

最后

开启新的终端即可生效

$ sudo apt update
[sudo] gelomen 的密码:
命中:1 http://mirrors.aliyun.com/ubuntu focal InRelease
命中:2 http://mirrors.aliyun.com/ubuntu focal-security InRelease
命中:3 http://mirrors.aliyun.com/ubuntu focal-updates InRelease
命中:4 http://mirrors.aliyun.com/ubuntu focal-proposed InRelease
命中:5 http://mirrors.aliyun.com/ubuntu focal-backports InRelease
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
所有软件包均为最新。

Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐