Computing.Net > Forums > Linux > Environment Variables in Linux

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

Reply to Message Icon

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...



Sponsored Link
Ads by Google

Response Number 1
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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Motorola SB5100 USB i n R... Red Hat Linux 7.2.1 Linux...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Environment Variables in Linux

Terminal in Red Hat 9 www.computing.net/answers/linux/terminal-in-red-hat-9-/29247.html

Monitor power off in linux env www.computing.net/answers/linux/monitor-power-off-in-linux-env/21291.html

how restore environment variables? www.computing.net/answers/linux/how-restore-environment-variables/22076.html