printenv PATH
echo $PATH
export PATH=路径1:路径2:路径4
命令行进行快速的PATH配置,仅仅在本次登录shell有效,也就是说重启后,添加的路径就从PATH中失效了。
注意路径使用":"分割
set PATH in BASH Shell as follows:
export PATH=.:/home/yap/bin:/bin:/usr/local/bin
export PATH=.:/home/yap/bin:printenv PATH
export TOOLCHAIN_HOME=/home/ubuntu/toolchains_android/android-arrch64
export PATH=$TOOLCHAIN_HOME/bin:$PATH
export LIBS="-lstdc++ -liconv -lgnustl_shared"
in TCSH Shell, you would do:
setenv PATH=.:/home/yap/bin:/bin:/usr/local/bin
执行下面的命令让环境变量立即生效
source /etc/profile