Where to export a truly global environment variable?

Posted by Socio on Server Fault See other posts from Server Fault or by Socio
Published on 2012-11-08T09:40:17Z Indexed on 2012/11/08 11:06 UTC
Read the original article Hit count: 161

Filed under:

I want to set an environment variable that will be visible to all processes launched by Upstart. This is on a CentOS system, but I presume the same applies to Ubuntu given that they both use Upstart.

Somewhere in /etc/init/ perhaps?

Note that adding it in /etc/profile.d only applies to login shells. I want all processes (e.g cron, rc.local, etc) to see it.

Obviously I'd prefer not to edit existing sys config files if it can be avoided.

© Server Fault or respective owner

Related posts about environment-variables