Mac环境变量配置文件.bash_profile

1、进入环境变量配置文件

open .bash_profile
vim .bash_profile
修改完需要激活
source .bash_profile

2、如何解决每次需要source ~/.bash_profile才能生效问题?

1.打开.zshrc文件(没有自行创建一个:vim .zshrc)
2.添加一行:source ~/.bash_profile ,关闭文件
3.再次执行 source ~/.bash_profile,下次重启终端就不需要source了

猜你喜欢

转载自blog.csdn.net/qq_35708058/article/details/112758430
今日推荐