Mac 下更新 bash_profile文件


touch ~/.bash_profile; // 将目录跳转到.bash_profile这个文件夹
open -t ~/.bash_profile //打开.bash_profile文件
这时候会弹出一个新的窗口输入
export PATH=$PATH:/Users/XXXXX/Applications/apache-tomcat-8.0.36/bin
保存 

 

也有的写:

1、打开terminal(终端)

2、cd ~ ( 进入当前用户的home目录)

3、open .bash_profile (打开.bash_profile文件,如果文件不存在就  创建文件:touch .bash_profile  编辑文件:open -e bash_profile)

4、直接更改弹出的.bash_profile文件内容

5、command + s 保存文件,然后关闭

6、在terminal(终端)中输入 source .bash_profile (使用刚才更新之后的内容)

 

刚开始学习mac os 从网上找的一些内容。

相关链接:https://blog.csdn.net/smoothiemiss/article/details/51723812


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM