编辑文件.bash_profile
vim .bash_profile加入编码内容
export LANG=en_US.UTF-8 export LC_CTYPE="en_US.UTF-8" export LC_NUMERIC="en_US.UTF-8" export LC_TIME="en_US.UTF-8" export LC_COLLATE="en_US.UTF-8" export LC_MONETARY="en_US.UTF-8" export LC_MESSAGES="en_US.UTF-8" export LC_PAPER="en_US.UTF-8" export LC_NAME="en_US.UTF-8" export LC_ADDRESS="en_US.UTF-8" export LC_TELEPHONE="en_US.UTF-8" export LC_MEASUREMENT="en_US.UTF-8" export LC_IDENTIFICATION="en_US.UTF-8" export LC_ALL=en_US.UTF-8然后保存,执行source
source .bash_profile至此,配置linux的编码完成