ssh 远程登录问题

2023-05-16  本文已影响0人  dhz120

测试环境:ubuntu20.04

1. 远程ssh不显示颜色解决方法

修改~/.bashrc, 使变量force_color_prompt=yes存在, 修改成功后执行source ~/.bashrc使配置文件生效

#force_color_prompt=yes
force_color_prompt=yes

2. ssh连入linux服务器~/.bashrc不执行的方法

在~/.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  

上一篇 下一篇

猜你喜欢

热点阅读