查看所有的变量:
$ printenv
PATH=/Library/Frameworks/Python.framework/Versions/3.4/bin:/Users/calios/.cabal/bin:/Applications/ghc-7.8.4.app/Contents/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Users/calios/.cabal/bin:/Applications/ghc-7.8.4.app/Contents/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Users/calios/.cabal/bin:/Applications/ghc-7.8.4.app/Contents/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
ZSH=/Users/calios/.oh-my-zsh
查看指定的变量:
$ echo $SHELL
/bin/zsh
设置临时环境变量
$ export PATH=$PATH:~/bin
后面的$PATH意味着在原有值的基础上,拼接上~/bin/,再将新值赋给PATH。
Post a comment now »
本文目前不可评论
Sorry, the comment form is closed at this time.
No comments yet.