Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Where is the best location that will work with the most flavors of Linux (Ubuntu, CentOS, Fedora, Etc) to store system wide environmental variables?

Seems like all three of these locations will work. Which is the best?



share|improve this question
Are these environemntal variables for use by a user in a shell or by some application? – fpmurphy1 Jun 24 '12 at 19:20

That's just what files like /etc/profile are for. :)

share|improve this answer
No, that's not what /etc/profile is for. It's not meant to be edited. Instead one should create new file in /etc/profile.d. See What do the scripts in /etc/profile.d do? – Piotr Dobrogost Apr 17 '15 at 9:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.