美文网首页爬虫(Mac)
解决重启SHELL后不会自动加载.bash_profile

解决重启SHELL后不会自动加载.bash_profile

作者: ag4kd | 来源:发表于2018-11-16 12:11 被阅读0次

我用的zsh,由于平时设置的环境变量都是在.bash_profile文件中,每次重启iterm后,都需要重启手动加载.bash_profile文件,很麻烦。

设置自动加载.bash_profile的方法如下:
在.zshrc配置文件中调用.bash_profile文件
打开zsh的配置文件.zshrc,在最后面添加一行代码

source /Users/binny/.bash_profile

binny 替换为你自己的同户名

source ~/.zshrc

这样重启shell便会自动加载.bash_profile文件了。

相关文章

网友评论

    本文标题:解决重启SHELL后不会自动加载.bash_profile

    本文链接:https://www.haomeiwen.com/subject/votmfqtx.html