Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 01-07-2008, 05:27 AM   #1
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


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

Old 01-07-2008, 07:21 AM   #2
LQ Addict
Registered: Oct 2003
Location: Australia
Distribution: MX 16
Posts: 5,296

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, 08:06 AM   #3
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: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060
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.


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

All times are GMT -5. The time now is 07:41 AM.

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