2014-08-28 80 views
1

我修改我的.bash_profile如下:Linux的紅帽.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 

ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe 
export ORACLE_HOME 
export PATH=$PATH:$ORACLE_HOME/bin 

export ORACLE_SID=XE 

JAVA_HOME=/home/oracle/softs/jdk1.7.0_25 
export JAVA_HOME 

export PATH=$PATH:$JAVA_HOME/bin 

echo $PATH命令的輸出並不像我期待:

/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin 

當然,我不能用Java命令。請幫忙。

回答

2

您是否重新加載環境? .bash_profile僅在您登錄時重新讀取。

嘗試提供資源的.bash_profile:

$ . ~/.bash_profile 

或者

$ source ~/.bash_profile 

或者只是註銷並重新登錄。

+0

'源'工作正常,你是超人:) – 2014-08-28 02:57:08