編輯 .bash_profile文件
該文件時(shí)一般都會(huì)選擇在當(dāng)前用戶目錄下/Users/xxx/.bash_profile萍丐,若沒(méi)有創(chuàng)建 .bash_profile轩端,
- 1啟動(dòng)終端
- 2進(jìn)入當(dāng)前用戶的home目錄(默認(rèn)就是)
— cd ~ 或 cd /Users/xxx - 3輸入touch .bash_profile
編輯 .bash_profile 文件
- 1終端輸入 open -e .bash_profile 編輯模式
— open .bash_profile 查看模式 - 2編輯好后輸入 source .bash_profile 更新環(huán)境變量