1

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?

/etc/environment
/etc/profile
/etc/bash.bashrc 

Thanks.

Justin
  • 5,328
  • 19
  • 64
  • 84

1 Answers1

2

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

EEAA
  • 109,363
  • 18
  • 175
  • 245
  • 2
    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?](http://unix.stackexchange.com/q/64258/5355) – Piotr Dobrogost Apr 17 '15 at 09:34