SSH到linux中文乱码

修改文件方式,通过修改/etc/sysconfig/i18n文件控制
[root@portal ~]# vi /etc/sysconfig/i18n
LANG=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=

修改文件保存退出之后要生效要执行如下命令才可生效
[root@portal ~]$ source /etc/sysconfig/i18n

你可能感兴趣的:(SSH到linux中文乱码)