From: https://blog.csdn.net/qq_18505715/article/details/83276208 打开终端 cd /Users/用户名 是否存在.bash_profile open .bash_profile 不存在即创建 touch .bash_profile 打开编辑后,让.bash_profile配置的全局变量理解生效 source ~/.bash_profile 可能不起作用,原因是 mac下采用zsh代替bash,而zsh加载的是 ~/.zshrc文件,而 ‘.zshrc’…