Mac 每次都要执行source ~/.bash_profile 配置的环境变量才生效
2018-01-31 10:34
1481 查看
自己在 ~/.bash_profile 中配置环境变量, 可是每次重启终端后配置的不生效.需要重新执行 : $source ~/.bash_profile
发现zsh加载的是 ~/.zshrc文件,而 ‘.zshrc’ 文件中并没有定义任务环境变量。
解决办法
在~/.zshrc文件最后,增加一行:
source ~/.bash_profile
发现zsh加载的是 ~/.zshrc文件,而 ‘.zshrc’ 文件中并没有定义任务环境变量。
解决办法
在~/.zshrc文件最后,增加一行:
source ~/.bash_profile
相关文章推荐
- Mac下配置环境导致终端无法执行.bash_profile命令的解决方法
- mac关于.bash_profile环境变量配置的问题
- mac关于java .bash_profile环境变量配置的问题
- linux环境变量设置 以及 source命令 Linux 之 /etc/profile、~/.bash_profile 等几个文件的执行过程 Linux 设置环境变量
- linux 在/etc/profile配置完jdk每次都要source才能使用java命令(配置永久环境变量)
- 配置Hadoop环境变量bash_profile
- Linux下环境变量配置方法梳理(.bash_profile和.bashrc的区别)
- mac .bash_profile环境变量汇总
- 使 .bash_profile 文件中环境变量马上生效的命令
- bash配置文件/etc/profile,/etc/bashrc,~/.bash_profile,~/.bashrc详解及修改PATH环境变量
- Linux 中/etc/profile、~/.bash_profile 等几个环境配置文件的执行过程
- linux 在~/.bash_profile配置完oracle每次都要source 才能使用的问题
- 使 .bash_profile 文件中环境变量马上生效的命令
- linux下使用source /etc/profile保存配置后,新的环境变量只能在一个终端里面有效
- mac .bash_profile环境变量汇总
- mac下创建bash_profile步骤+安卓环境配置
- 使 .bash_profile 文件中环境变量马上生效
- mac laravel 环境变量设置bash_profile
- mac pro 环境变量的配置 (当不存在 .bash_profile 文件的时候)
- mac pro 环境变量的配置 (当不存在 .bash_profile 文件的时候)