Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

environment variable in bash_profile is not working on OL 7.4

Mustafa KALAYCIMar 18 2018 — edited Mar 19 2018

Hello everyone,

I am really not an expert on linux and have some problems. I installed Oracle Linux 7.4 on virtualbox 5.2.8 running on windows 10. after installation, I created an oracle user to install db. I wanted to set ORACLE_BASE environment variable and as I remember I added it into .bash_profile file in /home/oracle. this is the entry I added:

ORACLE_BASE=/u01/app/oracle

export ORACLE_BASE

I saved .bash_profile then open a new terminal which as far as I know it should be read the .bash_profile and check ORACLE_BASE with echo $ORACLE_BASE but it was empty. I checked .bash_profile file but my entry was exist.

after that point, if I run "source .bash_profile" on the terminal, it works and I can see ORACLE_BASE variable but if start a new terminal I have to run source command again. if I restart the OS then it works again permanently.

beyond that if I write my variable into .bashrc it works directly on a new terminal.

so what am I doing wrong? is there a bug, missing in my knowledge or a new feature that I don't know?

This post has been answered by Dude! on Mar 19 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 16 2018
Added on Mar 18 2018
8 comments
3,265 views