升级big sur 11.4之后在~/.bash_profile中定义的变量不生效了,无法使用mvn命令
zsh读取的变量不是从~/.bash_profile中读取的
是从~/.zshrc读取
新增~/.zshrc
增加命令
source ~/.bash_profile
原理分析
优先级:
# 下面三个是系统级别配置文件,系统启动就会加载。
/etc/profile/
/etc/paths
/etc/bashrc
# bash_profile文件如果存在,则后面的几个文件就会被忽略不读。
~/.bash_profile 或 ~/.bashrc
~/.bash_login
~/.bash_profile