LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-08-2005, 07:36 AM   #1
Hiper1
LQ Newbie
 
Registered: Nov 2004
Posts: 16

Rep: Reputation: 0
Setting up a environment variable


Hi

I would like to setup the JAVA_HOME to /home/orpheus/java permently, so that I do not have to type export JAVA_HOME=/home/orpheus/java every time. I would like it to be set permently everytime I log in

Can somebody please tell how or where to do this
 
Old 03-08-2005, 08:01 AM   #2
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
hi there,

if you use bash, you can add this line to your $HOME/.bashrc file

Code:
export JAVA_HOME=/home/orpheus/java
regards

slackie1000
 
Old 03-08-2005, 08:12 AM   #3
Boow
Member
 
Registered: Feb 2004
Distribution: Slackware 10.2
Posts: 669

Rep: Reputation: 32
Well since I don't know your distro I can't tell you exactly where to put it but can point you to where to look. Most distros have a rc script where you can't put stuff you want to run at startup. Look in /etc/rc.d or /etc/init.d for something like rc.local or *.local.
 
Old 03-08-2005, 09:43 AM   #4
wpn146
Member
 
Registered: Jan 2005
Distribution: Solaris, Linux Fedora Core 6
Posts: 170

Rep: Reputation: 30
Quote:
Originally posted by Boow
Well since I don't know your distro I can't tell you exactly where to put it but can point you to where to look. Most distros have a rc script where you can't put stuff you want to run at startup. Look in /etc/rc.d or /etc/init.d for something like rc.local or *.local.
No, that will only set up the environment for the startup process and since it is run last, won't do anything for you.

To set the environment variables for all users logging in system wide, you could put it into /etc/profile. Otherwise, the user's .bashrc is fine.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
environment variable setting chii-chan Linux - General 5 01-23-2009 08:29 PM
setting environment variable kb_ganesh Ubuntu 3 09-10-2005 02:58 PM
setting environment variable DISPLAY jpan Debian 4 10-15-2004 07:09 PM
Trouble setting environment variable exitsfunnel Linux - Software 4 10-06-2004 07:49 AM
Setting an environment variable kharris Linux - General 3 10-02-2003 05:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration