环境变量设置无法生效?
设置了环境变量,只能在当前Terminal里存在,不能永久生效,怎么解决呢?
[oracle@linc ~]$ more .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
# umask 022
[oracle@linc ~]$ export ORACLE_BASE=/u01/app/oracle
[oracle@linc ~]$ export ORACLE_HOME=$ORACLE_BASE/oracle/product/10.2.0/db_1
[oracle@linc ~]$ export ORACLE_SID=orcl
[oracle@linc ~]$ source .bash_profile
[oracle@linc ~]$ more .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
# umask 022
[oracle@linc ~]$