5
我經常需要對我的~/.bash_profile
進行更改,並且必須重新啓動終端才能傳播更改。有沒有我可以運行的命令來重新給我的~/.bash_profile
?有沒有辦法通過bash_profile「資源」而不重新啓動終端?
我經常需要對我的~/.bash_profile
進行更改,並且必須重新啓動終端才能傳播更改。有沒有我可以運行的命令來重新給我的~/.bash_profile
?有沒有辦法通過bash_profile「資源」而不重新啓動終端?
是的,你可以運行:
source ~/.bash_profile
或者:
. ~/.bash_profile
這將重新加載/重新源在當前shell的.bash_profile
。
我把這個命令我~/.bash_profile
爲了方便:
alias reprofile='source ~/.bash_profile'
然後我只需鍵入reprofile
或repro
TAB。
類似'$ source〜/ .bash_profile'? – pah