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。

# 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.

重启系统之后,你会发现,Shell终端里也全部用中文显示。显然,这是不可以的。要不你试试:

# yum grouplist

显示出来的中文,你还可以拷贝中文结果,用来groupinstall吗?所以,要单独为shell处理一下。

# /root/.ssh/profile  //这里只管为root用户处理,其他用户不管,文件里只有一句:
export LANG=en_US.utf8

 

转载于:https://my.oschina.net/u/589241/blog/1845519

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值