编辑/etc/apt/sources.list
文件,添加国内镜像源,下图以Ubuntu2004wsl
为例
sudo apt-get install ttf-wqy-zenhei
sudo apt-get install language-pack-zh-hans
~/.profile
文件,在最后添加export LANG="zh_CN.UTF-8"
export LC_ALL="zh_CN.UTF-8"
sudo dpkg-reconfigure locales
按空格选中,选中会有*
号,tab
至OK
回车确定
原文:https://www.cnblogs.com/coderkenny/p/14640217.html