[systemd-devel] Set environment variable system-wide

Lennart Poettering lennart at poettering.net
Mon Aug 6 14:18:53 PDT 2012


On Mon, 06.08.12 23:09, Kay Sievers (kay at vrfy.org) wrote:

> 
> On Mon, Aug 6, 2012 at 10:49 PM, Daniel Drake <dsd at laptop.org> wrote:
> > Hi,
> >
> > I thought I read somewhere that systemd offers a mechanism to set an
> > environment variable system-wide - i.e. the variable assignment will
> > be present in all the processes started by systemd.
> >
> > But I can't find where I read this, or how to use it.
> >
> > Does this functionality exist or am I getting confused with something else?
> 
> systemctl set-environment ... ?

There's also systemd.setenv= on the kernel cmdline.

But as Kay said, don't use it for anything but debugging things. Most
likely you are doing something wrong if you think this is what you want.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list