如何从命令行重新加载.bash_profile?当我通过键入su - username
或source ~/.bash_profile
在终端上尝试此命令时,我得到了这个:
当我尝试使用su - username
:
MacBook-Pro-de-Khayati-iteb:~ Khayati_iteb$ su - khayati_iteb
Password:
-bash: /Users/macbookpro/.profile: No such file or directory
当我尝试使用source ~/.bash_profile
:
MacBook-Pro-de-Khayati-iteb:~ Khayati_iteb$ source ~/.bash_profile
-bash: /Users/macbookpro/.profile: No such file or directory
MacBook-Pro-de-Khayati-iteb:~ Khayati_iteb$
答案 0 :(得分:0)
使用命令.bash_profile
访问nano ~/.bash_profile
后,第一行是:
source ~/.profile
所以我将其更改为source ~/.bash_profile
问题得到解决。非常感谢大家chepner
SiKing