Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
418 views
in Technique[技术] by (71.8m points)

bash - 如何从命令行重新加载.bash_profile?(How to reload .bash_profile from the command line?)

How can I reload .bash_profile from the command line?

(如何从命令行重新加载.bash_profile ?)

I can get the shell to recognize changes to .bash_profile by exiting and logging back in but I would like to be able to do it on demand.

(我可以通过退出并重新登录来让shell识别对.bash_profile的更改,但我希望能够按需执行此操作。)

  ask by markdorison translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Simply type source ~/.bash_profile

(只需输入source ~/.bash_profile)

Alternatively, if you like saving keystrokes you can type . ~/.bash_profile

(或者,如果您想保存击键,可以键入. ~/.bash_profile) . ~/.bash_profile


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...