我经常需要对~/.bash_profile
进行更改,我必须重新启动终端才能传播更改。我可以运行任何命令来重新发送~/.bash_profile
吗?
答案 0 :(得分:7)
是的,您可以运行:
source ~/.bash_profile
或者:
. ~/.bash_profile
这将重新加载/重新获取当前shell中的.bash_profile
。
为方便起见,我将此命令放在~/.bash_profile
中:
alias reprofile='source ~/.bash_profile'
然后我只需输入reprofile
或repro
TAB 。