1. 打开终端 Terminal
2. 进入当前用户的 home 目录
3. touch .bash_profile(创建 .bash_profile)
4. open -e .bash_profile (打开 .bash_profile)
5. export PATH=$PATH:$HOME/bin:/sbin:/usr/bin:/usr/sbin
6. 保存文件,关闭.bash_profile
7. source .bash_profile (更新刚配置的环境变量)
1. 打开终端 Terminal
2. 进入当前用户的 home 目录
3. touch .bash_profile(创建 .bash_profile)
4. open -e .bash_profile (打开 .bash_profile)
5. export PATH=$PATH:$HOME/bin:/sbin:/usr/bin:/usr/sbin
6. 保存文件,关闭.bash_profile
7. source .bash_profile (更新刚配置的环境变量)
转载于:https://my.oschina.net/jack088/blog/651907