在 ubuntu 终端中,直到运行以下命令后,我的 .bashrc 才可用: source ~/.bashrc
我有一个 ~/.bash_profile ,内容如下:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
Run Code Online (Sandbox Code Playgroud)
我有一个 ~/.profile :
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
Run Code Online (Sandbox Code Playgroud)
我应该怎么做才能自动加载我的 .bashrc?我应该合并 .bash_profile 和 .profile 并删除其中之一吗?谢谢