繁体   English   中英

Linux Redhat .bash_profile不起作用

[英]Linux Redhat .bash_profile does not work

我将我的.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命令。 请帮忙。

您是否重新加载了环境? .bash_profile仅在您登录时重新读取。

尝试资源.bash_profile:

$ . ~/.bash_profile

要么

$ source ~/.bash_profile

或者只是注销并再次登录。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM