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