Hoang Nguyen huu
Hoang Nguyen huu

Reputation: 87

Linux Redhat .bash_profile does not work

I modified my .bash_profile as follow:

# .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

But the output of echo $PATH command is not as my expect:

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

Of course, I cannot use Java commands. Please help.

Upvotes: 2

Views: 2896

Answers (1)

mhawke
mhawke

Reputation: 87084

Did you reload your environment? .bash_profile is only re-read when you login.

Try resourcing .bash_profile:

$ . ~/.bash_profile

Or

$ source ~/.bash_profile

Or just log out and log in again.

Upvotes: 3

Related Questions