Linux CentOS 7 中ssh界面乱码

For the time being, my computer cannot input Chinese character. So I came up with this blog in English instead. I tried to enable Chinese in my installation of Linux CentOS 7, however, I found that my ssh always shows a messy of characters, not Chinese. After painstaking searches I find out the trick.
Linux CentOS 7设置语言已经再也不使用/etc/sysconfig/i18n,而是/etc/locale.conf。shell

# vi /etc/locale.conf

LANG="zh_CN.GB18030"  
LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"  
SUPPORTED="zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en"  
SYSFONT="lat0-sun16" 

//After saving the file and run:
# source /etc/locale.conf

If you're running CentOS 6 or the equivalent, you will have to modify a file located in /etc/sysconfig/i18n.bash

重启系统以后,你会发现,Shell终端里也所有用中文显示。显然,这是不能够的。要不你试试:ssh

# yum grouplistui

显示出来的中文,你还能够拷贝中文结果,用来groupinstall吗?因此,要单独为shell处理一下。this

# /root/.ssh/profile  //这里只管为root用户处理,其余用户无论,文件里只有一句:
export LANG=en_US.utf8
相关文章
相关标签/搜索