LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-07-2008, 04:27 AM   #1
otoomet
Member
 
Registered: Oct 2004
Location: Tartu, Ċrhus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 588

Rep: Reputation: 45
where to put system-wide environment variables


Hi,

what is the best place to put the system-wide environment variables? This is about ubuntu/bash. I have experimented with /etc/bash.bashrc, /etc/profile (both are repeatedly read, not just once), and /etc/environment (variables are not expanded).

Suggestions?
Ott
 
Old 01-07-2008, 06:21 AM   #2
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
lets take 3 types

root user....make it /root/.bashrc

one normal user then /home/yourname/.bashrc

multi user can stay /etc/bashrc
 
Old 01-07-2008, 07:06 AM   #3
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,080

Rep: Reputation: 797Reputation: 797Reputation: 797Reputation: 797Reputation: 797Reputation: 797Reputation: 797
System wide? /etc/profile is read at login irrespective of what shell you're using; if you've added an application that could be used by every potential system user, that would be the place to put the environment variables for it. For example, additions to LD_LIBRARY_PATH, PATHand the like. Otherwise, as suggested, in the user's home directories.
 
  


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
How to set up an system wide environment variable permanently?? piyush.kansal Fedora 5 12-07-2007 04:04 AM
Environment variables rumi2 Linux - Newbie 2 01-17-2007 06:44 PM
How to make system wild environment variables? renshao Linux - Newbie 5 03-12-2006 05:50 AM
environment variables Prakhardeep Linux - Software 3 10-06-2004 03:30 AM
System wide Environment variables Steave Linux - General 1 02-08-2002 05:44 PM


All times are GMT -5. The time now is 03:40 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