Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

permanent env varibales set up in bash shell

 
arun ramk
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,


Please let me know how to set up environmental variables in bash shell in linux.....
i need to setup environmental variables for java and oracle installations

i used export command....... but the variables exist only for that session........

please help
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Arun,

1) Reach the home directory. and search for /.bash_profile file.
2) Open in vi (or other prefered) editor
3) Add the env variables , save it
4) run ./.bash_profile or logout and login
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18167
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note: "/.bash_profile" refers to a file at the root of the filesystem. What you actually want to edit is one of the following:

~/.bash+profile

$(HOME)/.bash_profile

/home/xxxx/.bash_profile (where xxxx is your home directory name)

These are all references to the same file, but the first 2 are abbreviations provided by bash.
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

yeah ~/.bash_profile , here ~ is home directory.

[typo error in my previous post.]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic