Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-30-2006, 03:58 AM   #1
LQ Newbie
Registered: May 2006
Posts: 1

Rep: Reputation: 0
set environment variables


I would like to know how to set environment variables so programs,can be automaticlly loaded, or classpaths set.

Old 05-30-2006, 04:59 AM   #2
Senior Member
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 61
I assume you are using the bash shell.

For a user you can set them in ~/.bashrc or ~/.bash_profile.
For system wide, set them in /etc/profile.

What environment variables are you trying to set, and then we can give you the lines to add to these files. Also, what distro are you using - add it to your profile, it helps us to help you.

Old 05-30-2006, 05:15 AM   #3
spirit receiver
Registered: May 2006
Location: Frankfurt, Germany
Distribution: SUSE 10.2
Posts: 424

Rep: Reputation: 33
Note that ~/.profile might be used instead of ~/.bash_profile.


env, var

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
how do i set environment variables? guitarfella Slackware 2 12-04-2004 11:05 PM
KDE set environment variables TroelsSmit Linux - Newbie 3 09-06-2004 02:14 PM
Why can't my scripts set environment variables? Matthew3 Linux - Software 5 08-28-2004 05:26 PM
How to set environment variables anjaan Linux - General 3 06-10-2004 02:04 PM
Help with the currently set environment variables!! apoc013 Linux - Newbie 6 01-21-2004 01:28 AM

All times are GMT -5. The time now is 04:06 PM.

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