-
启动Terminal
-
进入当前用户的home目录
输入
cd ~
-
编辑.bash_profile文件
输入
open -e .bash_profile
,这时./bash_profile
就会打开,可以在后面加入要写入的环境变量(注意:从后往前读,注意覆盖) -
保存文件,关闭.bash_profile
-
更新刚配置的环境变量
输入
source .bash_profile
启动Terminal
进入当前用户的home目录
输入 cd ~
编辑.bash_profile文件
输入open -e .bash_profile
,这时./bash_profile
就会打开,可以在后面加入要写入的环境变量(注意:从后往前读,注意覆盖)
保存文件,关闭.bash_profile
更新刚配置的环境变量
输入source .bash_profile
本文标题:Mac下怎么打开./bash_profile
本文链接:https://www.haomeiwen.com/subject/mfzmaftx.html
网友评论