0
点赞
收藏
分享

微信扫一扫

Mac每次都要执行source ~/.bash_profile配置的环境变量才生效

~/.bash_profile中配置环境变量, 每次重启终端后配置不生效.需要重新执行 : $source ~/.bash_profile

解决办法
zsh加载的是 ~/.zshrc文件,而 ‘.zshrc’ 文件中并没有定义任务环境变量。
在~/.zshrc文件最后,增加一行:
source ~/.bash_profile

Mac每次都要执行source ~/.bash_profile配置的环境变量才生效_环境变量

Mac每次都要执行source ~/.bash_profile配置的环境变量才生效_bash_02




举报

相关推荐

0 条评论