Mac 打开、编辑 .bash_profile 文件



echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile source ~/.bash_profile

参考:http://mirrors.ustc.edu.cn/help/homebrew-bottles.html

或者:

1、创建 .bash_profile

1) 启动终端

 (2) 进入当前用户的home目录(默认就是): 
        cd ~3)输入touch .bash_profile

2、查看 、编辑 .bash_profile 文件

1)终端输入 open -e .bash_profile 
   (如果只是查看,直接使用open .bash_profile)

 (2)编辑

 (3)关闭即可保存修改

3、更新刚配置的环境变量

 输入source .bash_profile

一般在Mac上配置环境变量时经常要创建、编辑 .bash_profile文件。

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM