linux环境变量 bash_profile

[root@iZ23uewresmZ ~]# vi /root/.bash_profile

<pre>

# .bash_profile

# Get the aliases and functions 如果有~/.bashrc这个文件 就运行他

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

# User specific environment and startup programs 所有环境变量路径要用:冒号分开 不是分好 这个跟win不一样

PATH=$PATH:$HOME/bin:/usr/local/mysql/bin:/usr/local/mysql/lib

export PATH

</pre>

还有运行下更新代码 不然不会更新

<pre>

source .bash_profile

</pre>