解决办法

因为每次连接,Linux默认都会执行~/.bash_profile,

所以我们可以在~/.bash_profile文件内添加以下脚本:

if [ -n "$BASH_VERSION" ]; then  
    # include .bashrc if it exists  
    if [ -f "$HOME/.bashrc" ]; then  
        . "$HOME/.bashrc"  
    fi  
fi  

 

 

图示

解决Linux服务器SSH后不执行.bashrc命令

 

 

相关

ssh linux bashrc 总是没掉

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

 

 

相关文章:

  • 2021-11-05
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2021-08-22
  • 2021-05-27
  • 2021-08-28
  • 2021-11-11
猜你喜欢
  • 2021-08-28
  • 2021-05-16
  • 2022-12-23
  • 2022-12-23
  • 2022-02-05
  • 2022-12-23
  • 2021-10-27
相关资源
相似解决方案