# vi /etc/profile export PATH=$PATH:/path/to/xxx # source /etc/profile
# vi /home/用户名/.bash_profile
export PATH=$PATH:/path/to/xxx
# source /home/用户名/.bash_profile
# export HELLO="hello~"
echo $PATH
原文:http://www.cnblogs.com/siyue17/p/6704541.html