From d51586434677423e97decd0f8c02db0a266dd4e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 23 Feb 2021 17:18:05 +0100 Subject: [PATCH] man: add a description of how manager env block is set --- man/systemd.xml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/man/systemd.xml b/man/systemd.xml index 882b5a6c74e..893f113431e 100644 --- a/man/systemd.xml +++ b/man/systemd.xml @@ -609,6 +609,24 @@ Environment + The environment block for the system manager is initially set by the kernel. (In particular, + key=value assignments on the kernel command line are returned into environment + variables for PID 1). For the user manager, the system manager sets the environment as described in the + "Environment Variables in Spawned Processes" section of + systemd.exec5. The + DefaultEnvironment= setting in the system manager applies to all services including + user@.service. Additional entries may be configured (as for any other service) + through the Environment= and EnvironmentFile= settings for + user@.service (see + systemd.exec5). Also, + additional environment variables may be set through the ManagerEnvironment= setting in + systemd-system.conf5 + and + systemd-user.conf5. + + + Some of the variables understood by systemd: + $SYSTEMD_LOG_COLOR @@ -1090,12 +1108,11 @@ only the options described below are understood. Nevertheless, systemd is usually started in this mode through the user@.service5 - service, which is shared between all users, and it may be more convenient to use configuration files to + service, which is shared between all users. It may be more convenient to use configuration files to modify settings (see systemd-user.conf5), - or a drop-in that specifies one of the environment variables listed above in the Environment section - (see the discussion of Environment= and EnvironmentFile= in - systemd.exec5). + or environment variables. See the "Environment" section above for a discussion of how the environment + block is set.