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>