source ~/.bash_profile每次重启不生效解决
For mac问题:source ~/.bash_profile每次重启终端不生效的问题原因:.bash_profile 中修改环境变量只对当前窗口有效,而且需要 source ~/.bash_profile才能使用.zshrc 则相当于开机启动的环境变量你也可以在 .zshrc 文件中加一行 source .bash_profile 解决需要 source 才能使用的问题解决方法:in 终端编辑
·
For mac
问题:
source ~/.bash_profile
每次重启终端不生效的问题
原因:
.bash_profile 中修改环境变量只对当前窗口有效,而且需要 source ~/.bash_profile才能使用
.zshrc 则相当于开机启动的环境变量
你也可以在 .zshrc 文件中加一行 source .bash_profile 解决需要 source 才能使用的问题
解决方法:
in 终端
编辑~/.zshrc文件:
vim ~/.zshrc
增加以下内容,保存:
source ~/.bash_profile
更多推荐
已为社区贡献4条内容
所有评论(0)