1、打開terminal(終端)
2、cd ~ ( 進(jìn)入當(dāng)前用戶的home目錄)
3、open .bash_profile (打開.bash_profile文件,如果文件不存在就 創(chuàng)建文件:touch .bash_profile 編輯文件:open -e bash_profile)
4、直接更改彈出的.bash_profile文件內(nèi)容
5、command + s 保存文件,然后關(guān)閉
6、在terminal(終端)中輸入 source .bash_profile (使用剛才更新之后的內(nèi)容)