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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-17-2003, 08:03 PM
|
#1
|
Member
Registered: May 2003
Location: Canada
Distribution: Fedora 13
Posts: 49
Rep:
|
PATH and JAVA_HOME
Quick question about the above variables,
when ever I set them through the shell
eg.
export PATH="$PATH:/usr/java/ja<version>/bin"
and
export JAVA_HOME="/usr/java/ja<version>"
they only last for the duration of the shell. when ever I quit and reload the shell these variables are erased. I am trying to export them as the root user, but I can't figure out why they don't last, any help is greatly appreciated.
|
|
|
10-17-2003, 08:18 PM
|
#2
|
Senior Member
Registered: Oct 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131
Rep:
|
In your home directory, just add them to the appropriate .profile or rc file for your shell. e.g. .profile .bashrc .bash_profile
|
|
|
10-19-2003, 11:43 AM
|
#3
|
Member
Registered: May 2003
Location: Canada
Distribution: Fedora 13
Posts: 49
Original Poster
Rep:
|
If I do this in the root directory will it aply to all users?
|
|
|
10-19-2003, 05:20 PM
|
#4
|
Senior Member
Registered: Oct 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131
Rep:
|
No.
in /etc if you want it system wide. But usually this is not needed because you may alter the environment of the users shell that your logged into. So why make it system wide when you only need it for one app?
Hint: . or dot files in a users home directory are configuration setting and evironment setting for that users shell and programs. Not the whole system!
|
|
|
10-19-2003, 05:30 PM
|
#5
|
Senior Member
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054
Rep:
|
|
|
|
All times are GMT -5. The time now is 02:55 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|