1.语言变量LANG在 /etc/locale 文件中。
2.可以通过/ect/profile 来修改LC_TYPE 变量的值
添加如下代码
export LC_ALL="zh_CN.GBK" export LANG="zh_CN.GBK"
到profile文件中,变量的可以修改为你想要的字符编码
注意修改问以后需要source一把
如:source /ect/profile
3.查看本地系统字符集:locale -a
4.查看当前语言环境是否支持中文:locale 若包含:
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"则说明支持中文字符(猜测,我也没有亲测)
也可通过echo $LANG 来查看
5.检查系统为中文还是英文
df - h
表示英文系统。
参考链接:
https://blog.csdn.net/haiross/article/details/13509657
https://www.xuebuyuan.com/2147020.html
https://jingyan.baidu.com/article/ab69b270de8b4f2ca7189f1d.html
https://zhidao.baidu.com/question/681641601845891252.html
https://www.cnblogs.com/regit/p/7837814.html