Debain SSH终端中文显示乱码的解决办法

2011年10月09日 Linux基础 评论 1 条 阅读 9,805 views 次

先看中文的显示情况

error

可以通过下面的方法来解决此问题

第一步:选择语言

 

vps2408094:~# dpkg-reconfigure locales
Generating locales (this might take a while)...
  zh_CN.UTF-8... done
Generation complete.
vps2408094:~#

dpkg-reconfigure locales

 

dpkg-reconfigure locales 2

第二步:安装字体

 

vps2408094:~# apt-get install ttf-arphic-gkai00mp
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  ttf-arphic-gkai00mp
0 upgraded, 1 newly installed, 0 to remove and 22 not upgraded.
1 not fully installed or removed.
Need to get 2698kB of archives.
After this operation, 4743kB of additional disk space will be used.
Get:1 http://http.us.debian.org stable/main ttf-arphic-gkai00mp 2.11-8 [2698kB]
Fetched 2698kB in 6s (390kB/s)
Selecting previously deselected package ttf-arphic-gkai00mp.
(Reading database ... 26627 files and directories currently installed.)
Unpacking ttf-arphic-gkai00mp (from .../ttf-arphic-gkai00mp_2.11-8_all.deb) ...
Setting up pure-ftpd-mysql (1.0.28-3) ...
Starting ftp server: Running: /usr/sbin/pure-ftpd-mysql -l mysql:/etc/pure-ftpd/db/mysql.conf -l pam -E -A -O clf:/var/log/pure-ftpd/transfer.log -j -u 1000 -8 UTF-8 -B
Setting up ttf-arphic-gkai00mp (2.11-8) ...

第三步:新建环境文件

 

vps2408094:~# vim /etc/environment
加入下面内容
LANGUAGE="zh_CH:zh:en_US:en"
LANG="zh_CH"

第四步:重新登陆,测试效果

vps2408094:~# exit

good

再来查看同样的文件,发现能正常显示中文字了,很好,很不错!但要提醒一下大家,要注意终端的字符编码哦!

1 条留言  访客:1 条  博主:0 条

  1. 闻道有先后术业有专攻

给我留言

Copyright © 羽飞博客 保留所有权利.   Ality主题 皖ICP备14013844号-1

用户登录