如何从命令行重新加载.bash_profile文件

32 浏览
0 Comments

如何从命令行重新加载.bash_profile文件

如何通过命令行重新加载文件.bash_profile?

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

admin 更改状态以发布 2023年5月19日
0
0 Comments

. ~/.bash_profile

只要确保您在其中没有任何对当前状态的依赖即可。

0
0 Comments

只需键入source ~/.bash_profile

或者,如果您喜欢节省击键次数,可以键入. ~/.bash_profile

0