文章目錄
- 漢化配置
- 小結
漢化配置
-
檢查當前語言環境,執行指令
locale
,如果輸出的 LANG、LC_ALL 等未包含zh_CN.UTF-8
,需要設置中文環境。
-
安裝中文語言包
sudo apt update sudo apt install language-pack-zh-hans language-pack-zh-hant
-
設置系統語言為中文桌面
sudo dpkg-reconfigure locales
-
在彈出的窗口中選擇
zh_CN.UTF-8 UTF-8
然后回車確認。
-
然后繼續選擇
zh_CN.UTF-8
,回車確認。
-
更新系統默認語言為中文
sudo update-locale LANG=zh_CN.UTF-8 LC_ALL=zh_CN.UTF-8
-
編輯
/etc/default/locale
,確保內容如下LANG=zh_CN.UTF-8 LC_ALL=zh_CN.UTF-8
-
重啟系統
sudo reboot
-
再次執行
locale
,顯示如下內容
小結
以上內容在ubuntu-server
上進行了測試可以正常使用,如果有其他問題歡迎在評論區交流,謝謝!!