使用linux,在用户根目录(/root)下有一个.bash_profile配置文件,该配置只对当前用户有效.
使用ls -a命令可以查看到该文件.使用vi编辑器打开该文件后,在其中加入
保存退出后
执行source .bash_profile 或者重新连接SSH即可正常显示中文.
使用ls -a命令可以查看到该文件.使用vi编辑器打开该文件后,在其中加入
LANG=zh_CN.GB2312
export LANG
加入之后的为
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
LANG=zh_CN.GB2312
export PATH
export LANG
unset USERNAME
保存退出后
执行source .bash_profile 或者重新连接SSH即可正常显示中文.