关于Putty显示中文的问题

匿名 (未验证) 提交于 2019-12-03 00:27:02


Ubuntu 18.04换国内源

编辑/etc/apt/sources.list文件, 在文件最前面添加以下条目(操作前请做好相应备份):

阿里源

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

然后执行命令:

sudo apt-get update sudo apt-get upgrade 

更新好了之后

第二步:安装中文包

sudo apt-get install  language-pack-zh-han*

安装好了之后重启服务器

reboot unbuntu

这样启动终端的时候就是选UTF-8的编码了,然后设置/etc/environment sudo vi /etc/environment 然后在PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"下面添加
LANGUAGE="zh_CN:zh:en_US:en"
LC_ALL=zh_CN.UTF-8 LANG=zh_CN

然后去Putty里面进行设置


然后再


如图所示


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!