即使安裝 Linux 時已選中文語言,使用 PuTTY 遠端管理時中文資料夾名稱仍可能亂碼。以下方法可解決:
在 /etc/profile 檔案最後新增:
/etc/profile
export LC_ALL="zh_CN.GB18030"
在 /etc/sysconfig/i18n 檔案最後新增:
/etc/sysconfig/i18n
完成設定後,重新登入或執行 source /etc/profile 使設定生效,即可解決中文顯示亂碼問題。
source /etc/profile