mac 环境变量,只在当前终端有效
1. vim ~/.zshrc
source ~/.bash_profile
2. source ~/.zshrc
3. 关闭全部终端,再次打开,查看环境变量
=======================================================
其他方式:
方式1 :
vim /etc/profile 编辑该文件,由于11.2版本的操作系统,不能有效的对系统中的文件进行修改,所以不太适用
source ~/.bash_profile
=======================================================
vim /etc/profile 编辑该文件,由于11.2版本的操作系统,不能有效的对系统中的文件进行修改,所以不太适用