在~/.bashrc裏寫好了相應環境,在桌面登陸可以直接使用,但ssh每次都需要source下(沒有ll命令,沒有文件顏色),解決方法:
vim ~/.bash_profile
在文件內部輸入
# 加載.bashrc文件
if test -f .bashrc ; then
source .bashrc
fi
最後再
source ~/.bashrc
在~/.bashrc裏寫好了相應環境,在桌面登陸可以直接使用,但ssh每次都需要source下(沒有ll命令,沒有文件顏色),解決方法:
vim ~/.bash_profile
在文件內部輸入
# 加載.bashrc文件
if test -f .bashrc ; then
source .bashrc
fi
最後再
source ~/.bashrc
https://stackoverflow.com/questions/419163/what-does-if-name-main-do