解决linux在ssh使用~/.bashrc环境变量都需要重新source

在~/.bashrc里写好了相应环境,在桌面登陆可以直接使用,但ssh每次都需要source下(没有ll命令,没有文件颜色),解决方法:

vim ~/.bash_profile

在文件内部输入

# 加载.bashrc文件
if test -f .bashrc ; then
source .bashrc 
fi

最后再

source ~/.bashrc
原文地址:https://www.cnblogs.com/SimonHu1993/p/14131551.html