mac电脑bash_profile创建,打开,编辑,保存

版权声明:转载请通过公众号《湾区人工智能》联系我授权,谢谢 https://blog.csdn.net/BTUJACK/article/details/83822696

.bash_profile就像Windows下面的环境变量窗口,只不过这里是用编辑器来控制环境变量。

1、创建 .bash_profile

 

启动终端,

进入当前用户的home目录(默认就是):

cd ~     

 
 终端输入
 

 touch .bash_profile


2、查看 、编辑 .bash_profile 文件

 

终端输入 

 

open -e .bash_profile 

或者

open ~/.bash_profile

 编辑然后关闭


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


  终端输入
  source .bash_profile
 

猜你喜欢

转载自blog.csdn.net/BTUJACK/article/details/83822696
今日推荐