Mac 下新建 .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 (更新刚配置的环境变量)


你可能感兴趣的:(Mac 下新建 .bash_profile 文件)