1SYSTEMD.EXEC(5) systemd.exec SYSTEMD.EXEC(5)
2
3
4
6 systemd.exec - Execution environment configuration
7
9 service.service, socket.socket, mount.mount, swap.swap
10
12 Unit configuration files for services, sockets, mount points, and swap
13 devices share a subset of configuration options which define the
14 execution environment of spawned processes.
15
16 This man page lists the configuration options shared by these four unit
17 types. See systemd.unit(5) for the common options of all unit
18 configuration files, and systemd.service(5), systemd.socket(5),
19 systemd.swap(5), and systemd.mount(5) for more information on the
20 specific unit configuration files. The execution specific configuration
21 options are configured in the [Service], [Socket], [Mount], or [Swap]
22 sections, depending on the unit type.
23
24 In addition, options which control resources through Linux Control
25 Groups (cgroups) are listed in systemd.resource-control(5). Those
26 options complement options listed here.
27
29 A few execution parameters result in additional, automatic dependencies
30 to be added:
31
32 · Units with WorkingDirectory=, RootDirectory=, RootImage=,
33 RuntimeDirectory=, StateDirectory=, CacheDirectory=, LogsDirectory=
34 or ConfigurationDirectory= set automatically gain dependencies of
35 type Requires= and After= on all mount units required to access the
36 specified paths. This is equivalent to having them listed
37 explicitly in RequiresMountsFor=.
38
39 · Similar, units with PrivateTmp= enabled automatically get mount
40 unit dependencies for all mounts required to access /tmp and
41 /var/tmp. They will also gain an automatic After= dependency on
42 systemd-tmpfiles-setup.service(8).
43
44 · Units whose standard output or error output is connected to
45 journal, syslog or kmsg (or their combinations with console output,
46 see below) automatically acquire dependencies of type After= on
47 systemd-journald.socket.
48
50 The following settings may be used to change a service's view of the
51 filesystem. Please note that the paths must be absolute and must not
52 contain a ".." path component.
53
54 WorkingDirectory=
55 Takes a directory path relative to the service's root directory
56 specified by RootDirectory=, or the special value "~". Sets the
57 working directory for executed processes. If set to "~", the home
58 directory of the user specified in User= is used. If not set,
59 defaults to the root directory when systemd is running as a system
60 instance and the respective user's home directory if run as user.
61 If the setting is prefixed with the "-" character, a missing
62 working directory is not considered fatal. If
6