[英]Linux Redhat .bash_profile does not work
I modified my .bash_profile as follow: 我将我的.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
But the output of echo $PATH
command is not as my expect: 但是
echo $PATH
命令的输出不符合我的预期:
/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. 当然,我不能使用Java命令。 Please help.
请帮忙。
Did you reload your environment? 您是否重新加载了环境? .bash_profile is only re-read when you login.
.bash_profile仅在您登录时重新读取。
Try resourcing .bash_profile: 尝试资源.bash_profile:
$ . ~/.bash_profile
Or 要么
$ source ~/.bash_profile
Or just log out and log in again. 或者只是注销并再次登录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.