putty在登陆Linux系统后运行命令中文显示乱码的解决办法.docx

上传人:牧羊曲112 文档编号:4888405 上传时间:2023-05-21 格式:DOCX 页数:6 大小:292.54KB
返回 下载 相关 举报
putty在登陆Linux系统后运行命令中文显示乱码的解决办法.docx_第1页
第1页 / 共6页
putty在登陆Linux系统后运行命令中文显示乱码的解决办法.docx_第2页
第2页 / 共6页
putty在登陆Linux系统后运行命令中文显示乱码的解决办法.docx_第3页
第3页 / 共6页
putty在登陆Linux系统后运行命令中文显示乱码的解决办法.docx_第4页
第4页 / 共6页
putty在登陆Linux系统后运行命令中文显示乱码的解决办法.docx_第5页
第5页 / 共6页
亲,该文档总共6页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《putty在登陆Linux系统后运行命令中文显示乱码的解决办法.docx》由会员分享,可在线阅读,更多相关《putty在登陆Linux系统后运行命令中文显示乱码的解决办法.docx(6页珍藏版)》请在三一办公上搜索。

1、putty在登陆Linux系统后运行命令中文显示乱码的解决办法putty在登陆Linux系统后运行命令中文显示乱码raotlGcalhpst. - - . -60rw-rjcaobcxiya dmrwrwjtr-jtr-xrwjtr-jtr-xrwjtr-jtr-xrwjtr-jtr-xrwjtr-jtr-xrwjtr-jtr-xrw-rrrw-rrrootra-o-tra-o-tra-o-tr-&tr-&tr-&tr-&tro-o-tro-o-tro-o-tro-o-tro-o-troo-troo-t-1#rootrootrootrootra&tra&tra&tra&trootrootroo

2、trootrootwhich0 951 4096 4096 4096 4096 4096 0 4096 12140 550 4D96 4D96 4D96DvelinitL-T_ ;=_L.W _ =_ =二 _ _豆 _ =_ =_ _豆 _ =E_ =E_ mb =E = 一_ta_ 二E一 鲤鲤鲤鲤瓣瓣瓣瓣瓣瓣建雄踱踮链眺 777777777227777714:43 s06:12 anaconda-k:s. cfg 18:OS Desktop 18:05 Dacuments18:05 Downloads 13:OS Music15 : 35 DETTdir15:43 nefile318 :

3、 OS PiLCti?eB 2011 post-install 2011 post-install.log 18:05 Poblic13:05 Templates 20:59 test15:35 lie13:05 videQ3-1#which telinit rwAr-Jir-A. 1 rcrcrt root; 5072813 2011 /sbin/belinit;在putty中默认的字体和字符集并不适合显示中文,在putty窗口上右键,选择 change settings函 tdOtffi-DCalhDFt:| rnc-t &loca 1 ha-c 11 la -1DotoodyadnTME

4、EiMTdrwxr-JLT1driJKr-xs?d.TMirr-KTd 哲JKk-StkrootroatIMCrooi;rociizrootrMCrooiz工g0EODTrootDUO l:EMT-rH-c-rEMCEoorTMEEiMTdrwxr-JLT1driJKr-xs?d.TMirr-KTd 哲JKk-StkrootroatIMCrooi;rociizrootrMCEODTrootDUO l:951 4096 如业 096 4D9 4IO9ti a 4舞 12143 550 4096 如业 096 0-S09tig w 3 m7n 寻 fw 273 m7m H*. - hkta kE

5、- kE Jp* kE = 鼬辞鞭域科维域融疑域籍魅排直 777777777227777714!43 aD&! 12 B3iacc3itda-lt3IS;05 Desttcpid: 05 Dacmenx13 ! DS IqwnliQBrElSIS ; 05 Jduszc15 : 35 : nj -HU ?.IS:newfllelIQ;D5 Bxtuxea2011 posc-ljuarall2011 pDat-iJisrall1S;D5 Public13 : 05 珏皿1月。曲20 ! 5 cejc15 ; 35 testfile13; 05.cfg.log任 iES表呻-最吁叱状n寂此如X美闭

6、匡)ULM4距*心 C14Ddvuhl *1:Sj_. vn.Hopl;E让 JulLj llCh.iL 5矶*h性w.rnc-t loca 1 ho-c | # *utilch ellnlizIrooc?localb&c -Jt Is -1rellniL-TLnrr-KT-K. 1 eke r-oo-t: 5G72S 7 fefi? 19 2011 /tn/EEltnlrI roDt Blccalhast *-!# |Cipy All g CIj pbudClu- 2crllbk.4541 丁 WTbZlJlilEvil Sctwg如心fuTTI* rjdiE1兄弟医李明Af Linux技术

7、鲜在打开的配置窗口左边选择Appearance,在右边点Font settings里面的Change按钮,选择好中文字体,比如:宋体、新宋体之类的Cateaor)1Courier 卜lex, 1 u-pointAdjust the window banderFont settingsroiirt used in the teminal Aindov-.Adjust the use of the mouse po:r.ierHide mouse oisiter Ahen typing in indoIBehaviourTranslationSelection - ColoursF; Connec

8、tiorE SSHAdjust tlie use of the cureorCursor appearance: Block O IJndedine O Vertical lineI I Cursor 述nk口.割low seledion of varisNs pitch foiTts s-oiift quality:Q .-Mi alia sed(_? NQn-AntialiasedO ClearTyp e DefaultGap between text and .hidow edge:1J Sunken-edge bcnde;- SessionLoggingB- TeminslKe-boa

9、ndChar;ge.Cante;111 /sbin/t2011 past-install2011 past-install.log 18:05 Public15:35 test霉p777二IS:05 作二9鳏也TTJ Rcconfiguration18 : 05 Tencplatestest字体选择好了,还要确定字符集。选择配置窗口左边的Translation,在右边的 Received data assumed to be in which character set 下拉列表中选择最后 “Use font encoding”,最后点下面的Apply按钮就生效了。重新执行命令ls -1,就可

10、以正常看到中文了但是若还是乱码的话就执行以下命令,看看系统的字符集echo $LANG $LANGUAGErootlocalhost Is -1 which telinit-rwxr-Kr-K. 1 root root 5075871? 19 201 1 /sbin/-t.e 1 initrootlocalhot F echo $LANG SLANGUAGEzh_CN. UTF-8 -rootlocalhost 北原来系统的字符集是UTF-8呀。重新返回上面选择字符集的那一步,选择配置窗口左边 的 Translation,在右边的 Received data assumed to be in

11、which character set 下拉歹。表中 选择、UTF-8然后再运行上述命令即可将中文显示出来rcotLoe alliost # Is -1 wliich t elimt-rwxr-xrK. 1 root Yoot 50728 T月 19 2011 sbin/telini-t rentLocalhost #PuTTY中乱码的解决办法:先看看系统的字符集,如果是UTF-8的,那就简单了,选择好中文字体,然后编码选择UTF-8就行了。如果编码是GB2312、GBK、GB18030,当然也包括BIG5这些,在PuTTY的编码选择中看 不到这些编码,那就选择最后一个“Use font en

12、coding”,绝大部分情况下这样就没啥问题了, 反正我是没碰到有什么例外的情况。现在的Linux如果默认语言选择为中文,默认的编码就是UTF-8 了。以前安装Redhat AS 3时,语言选择为中文,默认的编码是zh_CN.gb2312, zh_CN.gb18030,好 像从AS 3 update 6开始,包括现在的AS4、AS5,中文的默认编码都成了 zh_CN.utf8。至 于Debian、Ubuntu等等这些上面,好像一直都是UTF-8。至于是使用UTF-8呢,还是用GB2312、GBK或者GB18030呢?我个人还是倾向于UTF-8。毕竟我们使用的大多数软件都是国外的,处理中文编码多

13、多少少有些问题,PuTTY自然也 不例外。下面的这个图上,我把终端编码修改为zh_CN.utf8,然后也按照前面的所说的方法把PuTTY的字符集修改为UTF-8。然后在终端中输入汉字中国”,按左方向键,可以看到 汉字显示很正常。r 0 Ot 1 u C =dlhoEtff l=Fl B-bash: 中国:GOOL:md not fuUI_Ldrijot 1 ocalhost # Q我重新把终端的编码修改为zh_CN.gb2312,同样的,把PuTTY的字符集修改为最后一个 “Use font encoding”。还是在终端上输入汉字柴锋,按下左方向键以后,会看到汉字乱码 了lr DofSl oca 1 t H 中、-bash;中 1 tpnicna nd n dl Found| |匹顷1 oca 1 h。目 i . #

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号