当我尝试从命令行重新加载.bash_profile时,我遇到了一些问题

时间:2017-01-31 20:50:31

标签: bash shell .bash-profile

如何从命令行重新加载.bash_profile?当我通过键入su - usernamesource ~/.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$ 

1 个答案:

答案 0 :(得分:0)

使用命令.bash_profile访问nano ~/.bash_profile后,第一行是: source ~/.profile所以我将其更改为source ~/.bash_profile 问题得到解决。非常感谢大家chepner SiKing

相关问题