ubuntu 修改环境变量 PATH

echo $PATH 
可以看到当前的path信息

<h2 id="临时设置" style="margin: 0.8em 0px; padding: 0px; box-sizing: border-box; font-weight: 100; font-family: "microsoft yahei"; line-height: 26px;">临时设置</h2><p style="margin-top: 0px; margin-bottom: 1.1em; padding-top: 0px; padding-bottom: 0px; box-sizing: border-box; font-family: "microsoft yahei"; font-size: 14px; line-height: 26px;"><code style="box-sizing: border-box; font-family: "Source Code Pro", monospace; padding: 2px 4px; font-size: 12.6px; color: rgb(63, 63, 63); white-space: nowrap; border-radius: 0px; background-color: rgba(128, 128, 128, 0.0745098);">export PATH=/opt/android-studio/bin:$PATH</code></p><hr style="box-sizing: border-box; margin: 2em 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: solid; border-top-color: rgba(128, 128, 128, 0.0980392); font-family: "microsoft yahei"; font-size: 14px; line-height: 26px;" /><h2 id="当前用户的全局设置" style="margin: 0.8em 0px; padding: 0px; box-sizing: border-box; font-weight: 100; font-family: "microsoft yahei"; line-height: 26px;"><a target=_blank name="t1" style="color: rgb(202, 0, 0); box-sizing: border-box;"></a>当前用户的全局设置</h2><p style="margin-top: 0px; margin-bottom: 1.1em; padding-top: 0px; padding-bottom: 0px; box-sizing: border-box; font-family: "microsoft yahei"; font-size: 14px; line-height: 26px;"><code style="box-sizing: border-box; font-family: "Source Code Pro", monospace; padding: 2px 4px; font-size: 12.6px; color: rgb(63, 63, 63); white-space: nowrap; border-radius: 0px; background-color: rgba(128, 128, 128, 0.0745098);">vim ~/.profile</code>,添加行: <br style="box-sizing: border-box;" /><code style="box-sizing: border-box; font-family: "Source Code Pro", monospace; padding: 2px 4px; font-size: 12.6px; color: rgb(63, 63, 63); white-space: nowrap; border-radius: 0px; background-color: rgba(128, 128, 128, 0.0745098);">export PATH=/opt/android-studio/bin:$PATH</code> <br style="box-sizing: border-box;" />使生效 <br style="box-sizing: border-box;" /><code style="box-sizing: border-box; font-family: "Source Code Pro", monospace; padding: 2px 4px; font-size: 12.6px; color: rgb(63, 63, 63); white-space: nowrap; border-radius: 0px; background-color: rgba(128, 128, 128, 0.0745098);">source .profile</code></p><hr style="box-sizing: border-box; margin: 2em 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: solid; border-top-color: rgba(128, 128, 128, 0.0980392); font-family: "microsoft yahei"; font-size: 14px; line-height: 26px;" /><h2 id="所有用户的全局设置" style="margin: 0.8em 0px; padding: 0px; box-sizing: border-box; font-weight: 100; font-family: "microsoft yahei"; line-height: 26px;"><a target=_blank name="t2" style="color: rgb(202, 0, 0); box-sizing: border-box;"></a>所有用户的全局设置</h2><p style="margin-top: 0px; margin-bottom: 1.1em; padding-top: 0px; padding-bottom: 0px; box-sizing: border-box; font-family: "microsoft yahei"; font-size: 14px; line-height: 26px;"><code style="box-sizing: border-box; font-family: "Source Code Pro", monospace; padding: 2px 4px; font-size: 12.6px; color: rgb(63, 63, 63); white-space: nowrap; border-radius: 0px; background-color: rgba(128, 128, 128, 0.0745098);">vim /etc/profile</code> <br style="box-sizing: border-box;" />在里面加入: <br style="box-sizing: border-box;" /><code style="box-sizing: border-box; font-family: "Source Code Pro", monospace; padding: 2px 4px; font-size: 12.6px; color: rgb(63, 63, 63); white-space: nowrap; border-radius: 0px; background-color: rgba(128, 128, 128, 0.0745098);">export PATH=/opt/android-studio/bin:$PATH</code> <br style="box-sizing: border-box;" />使生效 <br style="box-sizing: border-box;" /><code style="box-sizing: border-box; font-family: "Source Code Pro", monospace; padding: 2px 4px; font-size: 12.6px; color: rgb(63, 63, 63); white-space: nowrap; border-radius: 0px; background-color: rgba(128, 128, 128, 0.0745098);">source /etc/profile</code></p>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值