0

http://www.thegeekstuff.com/2008/10/execution-sequence-for-bash_profile-bashrc-bash_login-profile-and-bash_logout/ withの順序でそれらをリロードできますsourceが、短い方法はありますか?

つまり、すべてのファイルを順番にロードするコマンドであり、実行しないコマンドです。

source /etc/profile
source ~/.bash_profile
source ~/.bashrc
source ~/.bash_login
source ~/.profile
4

2 に答える 2

7

これは最善ではないかもしれませんが、すべてをリソース化する簡単な方法を次に示します。

exec bash -l

これ-lにより、bash がログイン シェルとして機能し、/etc/profile をソースにする必要があります。

于 2012-07-27T08:37:47.113 に答える
5

これをあなたの中に入れてください~/.bashrc

rld() {
  source /etc/profile
  source ~/.bash_profile
  source ~/.bashrc
  source ~/.bash_login
  source ~/.profile
}

これでrld、これらすべてのファイルをリロードしたいときにいつでも移動できます。

于 2012-07-27T08:50:32.223 に答える