解决centos7命令行中文乱码
时间:2015-03-14 03:59 来源:linux.it.net.cn 作者:IT
参考了一些网上的资料
-----------------版本信息
[zhangfen@localhost ~]$ cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core)
[zhangfen@localhost ~]$ uname -m
x86_64
[zhangfen@localhost ~]$ uname -r
3.10.0-123.el7.x86_64
[zhangfen@localhost ~]$ uname -a
Linux localhost.localdomain 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[zhangfen@localhost ~]$
-------------centos7解决中文乱码问题
[root@localhost ~]# cat /etc/locale.conf
LANG=en_US.UTF-8
[root@localhost ~]# cp /etc/locale.conf /etc/locale.conf_bak
[root@localhost ~]# vim /etc/locale.conf
LANG="zh_CN.GB18030"
LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
SUPPORTED="zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="lat0-sun16"
~
~
~
[root@localhost ~]# exit
--------------重启登录
Last login: Fri Mar 13 05:48:16 2015 from 192.168.245.1
[zhangfen@localhost ~]$ ll
总用量 0
(责任编辑:IT)
参考了一些网上的资料 -----------------版本信息 [zhangfen@localhost ~]$ cat /etc/redhat-release CentOS Linux release 7.0.1406 (Core) [zhangfen@localhost ~]$ uname -m x86_64 [zhangfen@localhost ~]$ uname -r 3.10.0-123.el7.x86_64 [zhangfen@localhost ~]$ uname -a Linux localhost.localdomain 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux [zhangfen@localhost ~]$ -------------centos7解决中文乱码问题 [root@localhost ~]# cat /etc/locale.conf LANG=en_US.UTF-8 [root@localhost ~]# cp /etc/locale.conf /etc/locale.conf_bak [root@localhost ~]# vim /etc/locale.conf LANG="zh_CN.GB18030" LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN" SUPPORTED="zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en" SYSFONT="lat0-sun16" ~ ~ ~ [root@localhost ~]# exit --------------重启登录 Last login: Fri Mar 13 05:48:16 2015 from 192.168.245.1 [zhangfen@localhost ~]$ ll 总用量 0 (责任编辑:IT) |