1. 启动终端Terminal
2. 进入当前用户的home目录
输入cd ~
3. 创建.bash_profile
输入touch .bash_profile
4. 编辑.bash_profile文件
输入open .bash_profile
在弹出的页面进行编辑
5. 保存文件,关闭.bash_profile
6. 更新刚配置的环境变量
输入source .bash_profile
本文详细介绍了如何在终端中配置.bash_profile文件的过程,包括启动终端、进入home目录、创建及编辑.bash_profile文件,并更新环境变量等步骤。
1. 启动终端Terminal
2. 进入当前用户的home目录
输入cd ~
3. 创建.bash_profile
输入touch .bash_profile
4. 编辑.bash_profile文件
输入open .bash_profile
在弹出的页面进行编辑
5. 保存文件,关闭.bash_profile
6. 更新刚配置的环境变量
输入source .bash_profile
1万+
1729

被折叠的 条评论
为什么被折叠?