Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Environment Variables in Linux
Name: Papi Date: August 4, 2003 at 17:01:08 Pacific OS: Redhat 9.0 CPU/Ram: p4 1.4 / 512 MB
Comment:
How do i set the environment variables permanently in linux ? I used the env command and that sets them temporarily.. the next time i use su, there is the old environment loaded again without the changes i made...
Name: 3Dave Date: August 5, 2003 at 07:37:30 Pacific
Reply:
Have a look at the "set" command and also in your profiles (/etc/profile, bashrc etc)
0
Response Number 2
Name: Papi Date: August 5, 2003 at 18:07:42 Pacific
Reply:
Thanx 3Dave,
I just thought i'd post to tell that there is a hidden file in the home directory by the name od bash_profile which contains environment variables to be set for the session as well. You simply type in the variable with the value and export it along with the rest in the file.
0
Response Number 3
Name: 3Dave Date: August 6, 2003 at 07:28:48 Pacific
Reply:
That's right, the hidden profile is just for specific users. If you want to make the change for all users, edit the /etc/profile instead.
You may also want to look at /etc/skel which is the default set of files used every time a new user is created.
0
Response Number 4
Name: martin Date: August 31, 2003 at 23:52:57 Pacific
Reply:
Dear Papi have the same proplem as you. Can you tell me the steps? I'm a new in Linux. thx a lot
Summary: 3Dave is kind of hinting about another problem you may have, which is the $PATH environment variable. There is a good chance that most of your programs are in a directory that is not in your $PATH. Fo...
Summary: hi all; 1-in my redhat 7.2,I've changed some env.variables using Export command but now I want to be sure that all of them will be cleaned...how can I do that?if I don't know all of their names how ma...