问题如:

ls
#''$'\345\233\276\347\211\207\347\261\273\345\236\213'

解决过程:

#安装中文支持包
sudo apt install language-pack-zh-hans

#修改/etc/environment,添加如下内容:
LANG="zh_CN.UTF-8"
LANGUAGE="zh_CN:zh:en_US:en"

#修改或创建/var/lib/locales/supported.d/local,添加如下内容:
en_US.UTF-8 UTF-8
zh_CN.UTF-8 UTF-8
zh_CN.GBK GBK
zh_CN GB2312

#生效
sudo locale-gen

#export 环境变量
export LANG="zh_CN.UTF-8"
export LC_ALL="zh_CN.UTF-8"
Last modification:July 15th, 2022 at 09:49 am