我通过添加以下内容更改了我的 ~/.profile 文件:
PATH="/user/share/android-sdk-linux/tools:$PATH"
Run Code Online (Sandbox Code Playgroud)
然后我注销并再次登录,但路径没有添加到 $PATH 环境变量中。我正在检查终端:
echo $PATH
/usr/share/android-sdk-linux/tools:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/jdk1.7.0_17/bin
Run Code Online (Sandbox Code Playgroud)
请指教
编辑
我什至尝试过:
PATH=$PATH:/usr/share/android-sdk-linux/tools
EXPORT PATH
Run Code Online (Sandbox Code Playgroud)
这里也没有运气。
编辑 2
~/.profile:
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package. …Run Code Online (Sandbox Code Playgroud)