查看
export
declare -x HISTCONTROL="ignoredups"
declare -x HISTSIZE="1000"declare -x HOME="/root"declare -x HOSTNAME="bogon"declare -x KDEDIRS="/usr"declare -x LANG="zh_CN.UTF-8"declare -x LESSOPEN="||/usr/bin/lesspipe.sh %s"declare -x LOGNAME="root"declare -x MAIL="/var/spool/mail/root"declare -x OLDPWD="/usr/local/php/bin"declare -x PATH="/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin"declare -x PWD="/etc/profile.d"declare -x QTDIR="/usr/lib64/qt-3.3"...................
单独查看path
用echo $PATH
[root@bogon profile.d]# echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin临时添加
export PATH=/usr/local/php/bin:$PATH
永久添加
vim /etc/profile
在文档最后,添加:export PATH="/usr/local/php/bin:$PATH"保存,退出,然后运行:source /etc/profile不报错则成功