linux終端與vi中文設定

來源:互聯網
上載者:User

linux終端與vi中文設定

#uname -a

Linux localhost.localdomain 2.6.9-42.ELsmp #1 SMP Sat Aug 12 09:39:11 CDT 2006 i686 i686 i386 GNU/Linux 

1. 控制台終端顯示中文

修改 /etc/sysconfig/i18n 檔案如下:

#LANG="en_US.UTF-8"
LANG="zh_CN.GB2312"
SUPPORTED="zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="latarcyrheb-sun16"

ls -la

總用量 21100
drwxr-x---  16 root   root         4096  2月  1 09:47 .
drwxr-xr-x  25 root   root         4096 12月  4 09:44 ..
-rw-r--r--   1 root   root         1532 2007-02-13  anaconda-ks.cfg
-rw-------   1 root   root        13250  2月  1 09:51 .bash_history
-rw-r--r--   1 root   root           24 2005-02-22  .bash_logout
-rw-r--r--   1 root   root          191 2005-02-22  .bash_profile
-rw-r--r--   1 root   root          176 2005-02-22  .bashrc

......

2. vi 顯示中文問題

編輯檔案.viminfo,修改如下 *encoding==utf-8,gbk,重新登入即可輸入顯示中文

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.