让~/.bashrc登录自动生效

每次登录都需要重新source ~/.bashrc使其生效

如果希望每次登录shell都让其生效,则在~.bash_profile中添加:

if test -f .bashrc ; then
source .bashrc
fi

注意格式!

posted @ 2020-08-12 11:27  dubbos  阅读(792)  评论(0)    收藏  举报