ubuntu安裝中文支持--讓你的ub真正變成中文
做者: 來源:
ubuntu在安裝的時候會提示選擇語言,但選擇了中文以後,系統裏面還有不少英文
並非ub對中文支持很差 你根本就沒有安裝中文支持~
首先須要網絡若是沒有網絡什麼都很難弄。
其次須要更新 更新源
終端中輸入:sudo gedit /etc/apt/sources.list linux
在打開的文件末尾加入以下信息 shell
#中國臺灣 臺灣大學更新服務器
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-updates main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-backports main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-security main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-proposed main multiverse restricted universe
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-proposed main restricted universe multiverse ubuntu
#臺灣官方更新源
deb http://tw.archive.ubuntu.com/ubuntu hardy main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse 服務器
#Ubuntu.cn99.com更新服務器
deb http://ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy-backports main restricted universe multiverse 網絡
#杭州雙線服務器
deb http://mirror.lupaworld.com/ubuntu hardy main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-proposed main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy-security main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy-updates main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy-backports main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy-proposed main restricted universe multiverse session
#Ubuntu 官方源(歐洲)
deb http://archive.ubuntu.com/ubuntu/ hardy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ hardy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ hardy main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse 工具
這個是更新源列表。
輸入完成,關掉這個文件,終端中輸入:sudo apt-get update
待列表更新完成才能夠安裝中文支持 ui
單擊「System」->「系統管理」->「Language Support」,啓動「Language Support」對話框。在語言列表中找到「漢語「,並將其右邊的小方框打鉤。 編碼
系統自動下載自動安裝,之後須要什麼軟件均可以在 添加/刪除 或者是 新立得軟件管理器 中查找安裝,都是自動下載自動安裝。若是想本身下載,最好找 .deb 格式的。 spa
沒有簡單方法,你剛裝的ubuntu本身看就會發現不少都是英文,可是也有中文,這就是沒安裝中文支持的結果~安裝了中文支持後多數都是中文,輸入法也自動安裝了~
二、
1.先改變Ubuntu中默認中文編碼方式爲GB2312
修改文件:
/var/lib/locales/supported.d/local
內容是:
en_US.UTF-8 UTF-8
zh_CN.UTF-8 UTF-8
zh_CN.GBK GBK
zh_CN GB2312
保存後 ,執行命令:
sudo locale-gen
讓系統可以很好的 支持中文
2.再安裝 zhcon: sudo apt-get install zhcon
3.zhcon是運行在framebuffer之上,在Ubuntu中開啓framebuffer操做,輸入下面的命令:
sudo zhcon --utf8 --drv=fb
就能夠顯示和輸入中文了,建議直接複製命令,utf8和drv前面是有兩個橫杆的!!
三、linux終端顯示亂碼
Xshell對於嵌入式開發來講,是個很是不錯的工具。但或許都有過被中文顯示爲亂碼的問題感受有點不爽。解決方法其實很簡單的,即把xshell編碼方式改爲UTF-8便可。
[文件]–>[打開]–>在打開的session中選擇鏈接的那個,點擊[屬性] -> [終端], 編碼選擇爲:Unicode(UTF-8),而後從新鏈接服務器便可。也能夠在Xshell的工具欄裏面點擊「編碼 」按鈕,選擇Unicode(UTF-8)編碼便可。
本人用的Xshell版本是:xshell3.0(build 0206) 簡體中文