LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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: 619

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
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

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,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:47 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration