LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-08-2008, 01:09 PM   #1
vineet7kumar
Member
 
Registered: Aug 2005
Posts: 75

Rep: Reputation: 15
howto set system-wide environment variables permanently in debian


Hi,
I have been using debian etch for past few weeks.
How do I set system-wide environment variables permanently?
For example, in my case every time I open the shell I have to set the http_proxy . How do I do it permanently (but not from the preferences->network_proxy) ?
I also did not find a .profile file in my home directory.
I found a /etc/environment file but that only contained the "LANG" variable.
which file stores the variables that are listed by the set command ?

Also how to edit environment variables permanently for a particular user only? (like editing the .profile file in UNIX)

Thanks and regards,
Vineet

Last edited by vineet7kumar; 05-08-2008 at 01:18 PM.
 
Old 05-08-2008, 04:11 PM   #2
poet_imp
LQ Newbie
 
Registered: Nov 2007
Location: Tucson, AZ
Distribution: Kubuntu/Gutsy
Posts: 26

Rep: Reputation: 15
I don't use Debian etch but I suspect the file you are looking for is .bashrc instead of .profile. Add your export XX=whatever to the end of the script.
 
Old 05-08-2008, 07:39 PM   #3
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,311

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
for bash, edit .bashrc or .bash_profile (individual users).
For all users, edit /etc/profile
 
  


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
where to put system-wide environment variables otoomet Linux - Software 2 01-07-2008 08:06 AM
How to set up an system wide environment variable permanently?? piyush.kansal Fedora 5 12-07-2007 05:04 AM
set environment variables johnvdster Linux - Newbie 2 05-30-2006 06:15 AM
Help with the currently set environment variables!! apoc013 Linux - Newbie 6 01-21-2004 02:28 AM
System wide Environment variables Steave Linux - General 1 02-08-2002 06:44 PM


All times are GMT -5. The time now is 01:03 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration