ssh登录ubuntu后终端不显示颜色
1、在 ~/.bashrc 文件找到 “#force_color_prompt=yes”,去掉前面的注释;
2、在 ~/.bash_profile文件种添加以下脚本,并执行 “source ~/.bash_profile”
# if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi fi
在 ~目录下,如果建立.bash_profile空文件,重启后ssh登录,终端没有颜色显示,可采用上述方法2来解决。