Debian Codegraph @

man/systemd.unit.xml

raw
1 <?xml version='1.0'?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % entities SYSTEM "custom-entities.ent" >
5 %entities;
6 ]>
7 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
8
9 <refentry id="systemd.unit"
10 xmlns:xi="http://www.w3.org/2001/XInclude">
11
12 <refentryinfo>
13 <title>systemd.unit</title>
14 <productname>systemd</productname>
15 </refentryinfo>
16
17 <refmeta>
18 <refentrytitle>systemd.unit</refentrytitle>
19 <manvolnum>5</manvolnum>
20 </refmeta>
21
22 <refnamediv>
23 <refname>systemd.unit</refname>
24 <refpurpose>Unit configuration</refpurpose>
25 </refnamediv>
26
27 <refsynopsisdiv>
28 <para><simplelist type="inline">
29 <member><filename><replaceable>service</replaceable>.service</filename></member>
30 <member><filename><replaceable>socket</replaceable>.socket</filename></member>
31 <member><filename><replaceable>device</replaceable>.device</filename></member>
32 <member><filename><replaceable>mount</replaceable>.mount</filename></member>
33 <member><filename><replaceable>automount</replaceable>.automount</filename></member>
34 <member><filename><replaceable>swap</replaceable>.swap</filename></member>
35 <member><filename><replaceable>target</replaceable>.target</filename></member>
36 <member><filename><replaceable>path</replaceable>.path</filename></member>
37 <member><filename><replaceable>timer</replaceable>.timer</filename></member>
38 <member><filename><replaceable>slice</replaceable>.slice</filename></member>
39 <member><filename><replaceable>scope</replaceable>.scope</filename></member>
40 </simplelist></para>
41
42 <refsect2>
43 <title>System Unit Search Path</title>
44
45 <para><simplelist>
46 <member><filename>/etc/systemd/system.control/*</filename></member>
47 <member><filename>/run/systemd/system.control/*</filename></member>
48 <member><filename>/run/systemd/transient/*</filename></member>
49 <member><filename>/run/systemd/generator.early/*</filename></member>
50 <member><filename>/etc/systemd/system/*</filename></member>
51 <member><filename>/etc/systemd/system.attached/*</filename></member>
52 <member><filename>/run/systemd/system/*</filename></member>
53 <member><filename>/run/systemd/system.attached/*</filename></member>
54 <member><filename>/run/systemd/generator/*</filename></member>
55 <member><filename index='false'>…</filename></member>
56 <member><filename>/usr/local/lib/systemd/system/*</filename></member>
57 <member><filename>/usr/lib/systemd/system/*</filename></member>
58 <member><filename>/run/systemd/generator.late/*</filename></member>
59 </simplelist></para>
60 </refsect2>
61
62 <refsect2>
63 <title>User Unit Search Path</title>
64 <para><simplelist>
65 <member><filename>~/.config/systemd/user.control/*</filename></member>
66 <member><filename>$XDG_RUNTIME_DIR/systemd/user.control/*</filename></member>
67 <member><filename>$XDG_RUNTIME_DIR/systemd/transient/*</filename></member>
68 <member><filename>$XDG_RUNTIME_DIR/systemd/generator.early/*</filename></member>
69 <member><filename>~/.config/systemd/user/*</filename></member>
70 <member><filename>$XDG_CONFIG_DIRS/systemd/user/*</filename></member>
71 <member><filename>/etc/systemd/user/*</filename></member>
72 <member><filename>$XDG_RUNTIME_DIR/systemd/user/*</filename></member>
73 <member><filename>/run/systemd/user/*</filename></member>
74 <member><filename>$XDG_RUNTIME_DIR/systemd/generator/*</filename></member>
75 <member><filename>$XDG_DATA_HOME/systemd/user/*</filename></member>
76 <member><filename>$XDG_DATA_DIRS/systemd/user/*</filename></member>
77 <member><filename index='false'>…</filename></member>
78 <member><filename>/usr/local/lib/systemd/user/*</filename></member>
79 <member><filename>/usr/lib/systemd/user/*</filename></member>
80 <member><filename>$XDG_RUNTIME_DIR/systemd/generator.late/*</filename></member>
81 </simplelist></para>
82 </refsect2>
83
84 </refsynopsisdiv>
85
86 <refsect1>
87 <title>Description</title>
88
89 <para>A unit file is a plain text ini-style file that encodes information about a service, a
90 socket, a device, a mount point, an automount point, a swap file or partition, a start-up
91 target, a watched file system path, a timer controlled and supervised by
92 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, a
93 resource management slice or a group of externally created processes. See
94 <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>7</manvolnum></citerefentry>
95 for a general description of the syntax.</para>
96
97 <para>This man page lists the common configuration options of all
98 the unit types. These options need to be configured in the [Unit]
99 or [Install] sections of the unit files.</para>
100
101 <para>In addition to the generic [Unit] and [Install] sections
102 described here, each unit may have a type-specific section, e.g.
103 [Service] for a service unit. See the respective man pages for
104 more information:
105 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
106 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
107 <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
108 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
109 <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
110 <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
111 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
112 <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
113 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
114 <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
115 <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
116 </para>
117
118 <para>Unit files are loaded from a set of paths determined during compilation, described in the next
119 section.</para>
120
121 <para>Valid unit names consist of a "unit name prefix", and a suffix specifying the unit type which
122 begins with a dot. The "unit name prefix" must consist of one or more valid characters (ASCII letters,
123 digits, <literal>:</literal>, <literal>-</literal>, <literal>_</literal>, <literal>.</literal>, and
124 <literal>\</literal>). The total length of the unit name including the suffix must not exceed 255
125 characters. The unit type suffix must be one of <literal>.service</literal>, <literal>.socket</literal>,
126 <literal>.device</literal>, <literal>.mount</literal>, <literal>.automount</literal>,
127 <literal>.swap</literal>, <literal>.target</literal>, <literal>.path</literal>,
128 <literal>.timer</literal>, <literal>.slice</literal>, or <literal>.scope</literal>.</para>
129
130 <para>Unit names can be parameterized by a single argument called the "instance name". The unit is then
131 constructed based on a "template file" which serves as the definition of multiple services or other
132 units. A template unit must have a single <literal>@</literal> at the end of the unit name prefix (right
133 before the type suffix). The name of the full unit is formed by inserting the instance name between
134 <literal>@</literal> and the unit type suffix. In the unit file itself, the instance parameter may be
135 referred to using <literal>%i</literal> and other specifiers, see below.</para>
136
137 <para>Unit files may contain additional options on top of those listed here. If systemd encounters an
138 unknown option, it will write a warning log message but continue loading the unit. If an option or
139 section name is prefixed with <option>X-</option>, it is ignored completely by systemd. Options within an
140 ignored section do not need the prefix. Applications may use this to include additional information in
141 the unit files. To access those options, applications need to parse the unit files on their own.</para>
142
143 <para>Units can be aliased (have an alternative name), by creating a symlink from the new name to the
144 existing name in one of the unit search paths. For example, <filename>systemd-networkd.service</filename>
145 has the alias <filename>dbus-org.freedesktop.network1.service</filename>, created during installation as
146 a symlink, so when <command>systemd</command> is asked through D-Bus to load
147 <filename>dbus-org.freedesktop.network1.service</filename>, it'll load
148 <filename>systemd-networkd.service</filename>. As another example, <filename>default.target</filename> —
149 the default system target started at boot — is commonly aliased to either
150 <filename>multi-user.target</filename> or <filename>graphical.target</filename> to select what is started
151 by default. Alias names may be used in commands like <command>disable</command>,
152 <command>start</command>, <command>stop</command>, <command>status</command>, and similar, and in all
153 unit dependency directives, including <varname>Wants=</varname>, <varname>Requires=</varname>,
154 <varname>Before=</varname>, <varname>After=</varname>. Aliases cannot be used with the
155 <command>preset</command> command.</para>
156
157 <para>Aliases obey the following restrictions: a unit of a certain type (<literal>.service</literal>,
158 <literal>.socket</literal>, …) can only be aliased by a name with the same type suffix. A plain unit (not
159 a template or an instance), may only be aliased by a plain name. A template instance may only be aliased
160 by another template instance, and the instance part must be identical. A template may be aliased by
161 another template (in which case the alias applies to all instances of the template). As a special case, a
162 template instance (e.g. <literal>[email protected]</literal>) may be a symlink to different template
163 (e.g. <literal>[email protected]</literal>). In that case, just this specific instance is aliased,
164 while other instances of the template (e.g. <literal>[email protected]</literal>,
165 <literal>[email protected]</literal>) are not aliased. Those rules preserve the requirement that the
166 instance (if any) is always uniquely defined for a given unit and all its aliases. The target of alias
167 symlink must point to a valid unit file location, i.e. the symlink target name must match the symlink
168 source name as described, and the destination path must be in one of the unit search paths, see UNIT FILE
169 LOAD PATH section below for more details. Note that the target file might not exist, i.e. the symlink may
170 be dangling.</para>
171
172 <para>Unit files may specify aliases through the <varname>Alias=</varname> directive in the [Install]
173 section. When the unit is enabled, symlinks will be created for those names, and removed when the unit is
174 disabled. For example, <filename>reboot.target</filename> specifies
175 <varname>Alias=ctrl-alt-del.target</varname>, so when enabled, the symlink
176 <filename>/etc/systemd/system/ctrl-alt-del.target</filename> pointing to the
177 <filename>reboot.target</filename> file will be created, and when
178 <keycombo><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>Del</keycap></keycombo> is invoked,
179 <command>systemd</command> will look for <filename>ctrl-alt-del.target</filename>, follow the symlink to
180 <filename>reboot.target</filename>, and execute <filename>reboot.service</filename> as part of that target.
181 <command>systemd</command> does not look at the [Install] section at all during normal operation, so any
182 directives in that section only have an effect through the symlinks created during enablement.</para>
183
184 <para>Along with a unit file <filename>foo.service</filename>, the directory
185 <filename>foo.service.wants/</filename> may exist. All unit files symlinked from such a directory are
186 implicitly added as dependencies of type <varname>Wants=</varname> to the unit. Similar functionality
187 exists for <varname>Requires=</varname> type dependencies as well, the directory suffix is
188 <filename>.requires/</filename> in this case. This functionality is useful to hook units into the
189 start-up of other units, without having to modify their unit files. For details about the semantics of
190 <varname>Wants=</varname> and <varname>Requires=</varname>, see below. The preferred way to create
191 symlinks in the <filename>.wants/</filename> or <filename>.requires/</filename> directories is by
192 specifying the dependency in [Install] section of the target unit, and creating the symlink in the file
193 system with the <command>enable</command> or <command>preset</command> commands of
194 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>. The
195 target can be a normal unit (either plain or a specific instance of a template unit). In case when the
196 source unit is a template, the target can also be a template, in which case the instance will be
197 "propagated" to the target unit to form a valid unit instance. The target of symlinks in
198 <filename>.wants/</filename> or <filename>.requires/</filename> must thus point to a valid unit file
199 location, i.e. the symlink target name must satisfy the described requirements, and the destination path
200 must be in one of the unit search paths, see UNIT FILE LOAD PATH section below for more details. Note
201 that the target file might not exist, i.e. the symlink may be dangling.</para>
202
203 <para>Along with a unit file <filename>foo.service</filename>, a "drop-in" directory
204 <filename>foo.service.d/</filename> may exist. All files with the suffix
205 <literal>.conf</literal> from this directory will be merged in the alphanumeric order and parsed
206 after the main unit file itself has been parsed. This is useful to alter or add configuration
207 settings for a unit, without having to modify unit files. Each drop-in file must contain appropriate
208 section headers. For instantiated units, this logic will first look for the instance
209 <literal>.d/</literal> subdirectory (e.g. <literal>[email protected]/</literal>) and read its
210 <literal>.conf</literal> files, followed by the template <literal>.d/</literal> subdirectory (e.g.
211 <literal>[email protected]/</literal>) and the <literal>.conf</literal> files there. Moreover, for unit
212 names containing dashes (<literal>-</literal>), the set of directories generated by repeatedly
213 truncating the unit name after all dashes is searched too. Specifically, for a unit name
214 <filename>foo-bar-baz.service</filename> not only the regular drop-in directory
215 <filename>foo-bar-baz.service.d/</filename> is searched but also both <filename>foo-bar-.service.d/</filename> and
216 <filename>foo-.service.d/</filename>. This is useful for defining common drop-ins for a set of related units, whose
217 names begin with a common prefix. This scheme is particularly useful for mount, automount and slice units, whose
218 systematic naming structure is built around dashes as component separators. Note that equally named drop-in files
219 further down the prefix hierarchy override those further up,
220 i.e. <filename>foo-bar-.service.d/10-override.conf</filename> overrides
221 <filename>foo-.service.d/10-override.conf</filename>.</para>
222
223 <para>In cases of unit aliases (described above), dropins for the aliased name and all aliases are
224 loaded. In the example of <filename>default.target</filename> aliasing
225 <filename>graphical.target</filename>, <filename>default.target.d/</filename>,
226 <filename>default.target.wants/</filename>, <filename>default.target.requires/</filename>,
227 <filename>graphical.target.d/</filename>, <filename>graphical.target.wants/</filename>,
228 <filename>graphical.target.requires/</filename> would all be read. For templates, dropins for the
229 template, any template aliases, the template instance, and all alias instances are read. When just a
230 specific template instance is aliased, then the dropins for the target template, the target template
231 instance, and the alias template instance are read.</para>
232
233 <para>In addition to <filename>/etc/systemd/system</filename>, the drop-in <literal>.d/</literal>
234 directories for system services can be placed in <filename>/usr/lib/systemd/system</filename> or
235 <filename>/run/systemd/system</filename> directories. Drop-in files in <filename>/etc/</filename>
236 take precedence over those in <filename>/run/</filename> which in turn take precedence over those
237 in <filename>/usr/lib/</filename>. Drop-in files under any of these directories take precedence
238 over unit files wherever located. Multiple drop-in files with different names are applied in
239 lexicographic order, regardless of which of the directories they reside in.</para>
240
241 <para>Units also support a top-level drop-in with <filename><replaceable>type</replaceable>.d/</filename>,
242 where <replaceable>type</replaceable> may be e.g. <literal>service</literal> or <literal>socket</literal>,
243 that allows altering or adding to the settings of all corresponding unit files on the system.
244 The formatting and precedence of applying drop-in configurations follow what is defined above.
245 Files in <filename><replaceable>type</replaceable>.d/</filename> have lower precedence compared
246 to files in name-specific override directories. The usual rules apply: multiple drop-in files
247 with different names are applied in lexicographic order, regardless of which of the directories
248 they reside in, so a file in <filename><replaceable>type</replaceable>.d/</filename> applies
249 to a unit only if there are no drop-ins or masks with that name in directories with higher
250 precedence. See Examples.</para>
251
252 <para>Note that while systemd offers a flexible dependency system
253 between units it is recommended to use this functionality only
254 sparingly and instead rely on techniques such as bus-based or
255 socket-based activation which make dependencies implicit,
256 resulting in a both simpler and more flexible system.</para>
257
258 <para>As mentioned above, a unit may be instantiated from a template file. This allows creation
259 of multiple units from a single configuration file. If systemd looks for a unit configuration
260 file, it will first search for the literal unit name in the file system. If that yields no
261 success and the unit name contains an <literal>@</literal> character, systemd will look for a
262 unit template that shares the same name but with the instance string (i.e. the part between the
263 <literal>@</literal> character and the suffix) removed. Example: if a service
264 <filename>[email protected]</filename> is requested and no file by that name is found, systemd
265 will look for <filename>[email protected]</filename> and instantiate a service from that
266 configuration file if it is found.</para>
267
268 <para>To refer to the instance string from within the
269 configuration file you may use the special <literal>%i</literal>
270 specifier in many of the configuration options. See below for
271 details.</para>
272
273 <para>If a unit file is empty (i.e. has the file size 0) or is
274 symlinked to <filename>/dev/null</filename>, its configuration
275 will not be loaded and it appears with a load state of
276 <literal>masked</literal>, and cannot be activated. Use this as an
277 effective way to fully disable a unit, making it impossible to
278 start it even manually.</para>
279
280 <para>Files (including directories) with names that match certain patterns are
281 generally ignored. This includes names that start with a <literal>.</literal> or
282 end with a <literal>.ignore</literal>.</para>
283
284 <para>When unit aliasing is introduced during reload/reexec (e.g., converting
285 <filename>b.service</filename> to a symlink pointing to <filename>a.service</filename>), the running
286 state of the canonical unit (<filename>a.service</filename>) is preserved. The old serialized state
287 of the now-aliased unit is migrated to a new stub orphaned unit to prevent stale data from
288 corrupting the canonical unit's live state. Dependencies referencing the alias name are automatically
289 resolved to the canonical unit, and the dependency graph is rebuilt from unit files, ensuring
290 consistency. If the now-aliased unit had resources such as running processes, they will now be tracked
291 under the new orphaned unit. Once all resources are gone (e.g. all processes have exited) the orphaned
292 unit will be garbage collected automatically.</para>
293
294 <para>The unit file format is covered by the
295 <ulink url="https://systemd.io/PORTABILITY_AND_STABILITY/">Interface
296 Portability and Stability Promise</ulink>.</para>
297
298 </refsect1>
299
300 <refsect1>
301 <title>String Escaping for Inclusion in Unit Names</title>
302
303 <para>Sometimes it is useful to convert arbitrary strings into unit names. To facilitate this, a method of string
304 escaping is used, in order to map strings containing arbitrary byte values (except <constant>NUL</constant>) into
305 valid unit names and their restricted character set. A common special case are unit names that reflect paths to
306 objects in the file system hierarchy. Example: a device unit <filename>dev-sda.device</filename> refers to a device
307 with the device node <filename index="false">/dev/sda</filename> in the file system.</para>
308
309 <para>The escaping algorithm operates as follows: given a string, any <literal>/</literal> character is
310 replaced by <literal>-</literal>, and all other characters which are not ASCII alphanumerics,
311 <literal>:</literal>, <literal>_</literal> or <literal>.</literal> are replaced by C-style
312 <literal>\x2d</literal> escapes. In addition, <literal>.</literal> is replaced with such a C-style escape
313 when it would appear as the first character in the escaped string.</para>
314
315 <para>When the input qualifies as absolute file system path, this algorithm is extended slightly: the path to the
316 root directory <literal>/</literal> is encoded as single dash <literal>-</literal>. In addition, any leading,
317 trailing or duplicate <literal>/</literal> characters are removed from the string before transformation. Example:
318 <filename index="false">/foo//bar/baz/</filename> becomes <literal>foo-bar-baz</literal>.</para>
319
320 <para>This escaping is fully reversible, as long as it is known whether the escaped string was a path (the
321 unescaping results are different for paths and non-path strings). The
322 <citerefentry><refentrytitle>systemd-escape</refentrytitle><manvolnum>1</manvolnum></citerefentry> command may be
323 used to apply and reverse escaping on arbitrary strings. Use <command>systemd-escape --path</command> to escape
324 path strings, and <command>systemd-escape</command> without <option>--path</option> otherwise.</para>
325 </refsect1>
326
327 <refsect1>
328 <title>Automatic dependencies</title>
329
330 <refsect2>
331 <title>Implicit Dependencies</title>
332
333 <para>A number of unit dependencies are implicitly established, depending on unit type and
334 unit configuration. These implicit dependencies can make unit configuration file cleaner. For
335 the implicit dependencies in each unit type, please refer to section "Implicit Dependencies"
336 in respective man pages.</para>
337
338 <para>For example, service units with <varname>Type=dbus</varname> automatically acquire
339 dependencies of type <varname>Requires=</varname> and <varname>After=</varname> on
340 <filename>dbus.socket</filename>. See
341 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
342 for details.</para>
343 </refsect2>
344
345 <refsect2>
346 <title>Default Dependencies</title>
347
348 <para>Default dependencies are similar to implicit dependencies, but can be turned on and off
349 by setting <varname>DefaultDependencies=</varname> to <varname>yes</varname> (the default) and
350 <varname>no</varname>, while implicit dependencies are always in effect. See section "Default
351 Dependencies" in respective man pages for the effect of enabling
352 <varname>DefaultDependencies=</varname> in each unit types.</para>
353
354 <para>For example, target units will complement all configured dependencies of type
355 <varname>Wants=</varname> or <varname>Requires=</varname> with dependencies of type
356 <varname>After=</varname>. See
357 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>
358 for details. Note that this behavior can be opted out by setting
359 <varname>DefaultDependencies=no</varname> in the specified units, or it can be selectively
360 overridden via an explicit <varname>Before=</varname> dependency.</para>
361 </refsect2>
362 </refsect1>
363
364 <refsect1>
365 <title>Unit File Load Path</title>
366
367 <para>Unit files are loaded from a set of paths determined during
368 compilation, described in the two tables below. Unit files found
369 in directories listed earlier override files with the same name in
370 directories lower in the list
371 <xi:include href="standard-conf.xml" xpointer="usr-local-footnote" />.
372 </para>
373
374 <para>When the variable <varname>$SYSTEMD_UNIT_PATH</varname> is set,
375 the contents of this variable overrides the unit load path. If
376 <varname>$SYSTEMD_UNIT_PATH</varname> ends with an empty component
377 (<literal>:</literal>), the usual unit load path will be appended
378 to the contents of the variable.</para>
379
380 <table>
381 <title>
382 Load path when running in system mode (<option>--system</option>).
383 </title>
384
385 <tgroup cols='2'>
386 <colspec colname='path' />
387 <colspec colname='expl' />
388 <thead>
389 <row>
390 <entry>Path</entry>
391 <entry>Description</entry>
392 </row>
393 </thead>
394 <tbody>
395 <row>
396 <entry><filename>/etc/systemd/system.control</filename></entry>
397 <entry morerows="1">Persistent and transient configuration created using the dbus API</entry>
398 </row>
399 <row>
400 <entry><filename>/run/systemd/system.control</filename></entry>
401 </row>
402 <row>
403 <entry><filename>/run/systemd/transient</filename></entry>
404 <entry>Dynamic configuration for transient units</entry>
405 </row>
406 <row>
407 <entry><filename>/run/systemd/generator.early</filename></entry>
408 <entry>Generated units with high priority (see <replaceable>early-dir</replaceable> in <citerefentry
409 ><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>)</entry>
410 </row>
411 <row>
412 <entry><filename>/etc/systemd/system</filename></entry>
413 <entry>System units created by the administrator</entry>
414 </row>
415 <row>
416 <entry><filename>/run/systemd/system</filename></entry>
417 <entry>Runtime units</entry>
418 </row>
419 <row>
420 <entry><filename>/run/systemd/generator</filename></entry>
421 <entry>Generated units with medium priority (see <replaceable>normal-dir</replaceable> in <citerefentry
422 ><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>)</entry>
423 </row>
424 <row>
425 <entry><filename>/usr/local/lib/systemd/system</filename></entry>
426 <entry>System units installed by the administrator</entry>
427 </row>
428 <row>
429 <entry><filename>/usr/lib/systemd/system</filename></entry>
430 <entry>System units installed by the distribution package manager</entry>
431 </row>
432 <row>
433 <entry><filename>/run/systemd/generator.late</filename></entry>
434 <entry>Generated units with low priority (see <replaceable>late-dir</replaceable> in <citerefentry
435 ><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>)</entry>
436 </row>
437 </tbody>
438 </tgroup>
439 </table>
440
441 <table>
442 <title>
443 Load path when running in user mode (<option>--user</option>).
444 </title>
445
446 <tgroup cols='2'>
447 <colspec colname='path' />
448 <colspec colname='expl' />
449 <thead>
450 <row>
451 <entry>Path</entry>
452 <entry>Description</entry>
453 </row>
454 </thead>
455 <tbody>
456 <row>
457 <entry><filename>$XDG_CONFIG_HOME/systemd/user.control</filename> or <filename
458 >~/.config/systemd/user.control</filename></entry>
459 <entry morerows="1">Persistent and transient configuration created using the dbus API (<varname>$XDG_CONFIG_HOME</varname> is used if set, <filename>~/.config</filename> otherwise)</entry>
460 </row>
461 <row>
462 <entry><filename>$XDG_RUNTIME_DIR/systemd/user.control</filename></entry>
463 </row>
464 <row>
465 <entry><filename>$XDG_RUNTIME_DIR/systemd/transient</filename></entry>
466 <entry>Dynamic configuration for transient units</entry>
467 </row>
468 <row>
469 <entry><filename>$XDG_RUNTIME_DIR/systemd/generator.early</filename></entry>
470 <entry>Generated units with high priority (see <replaceable>early-dir</replaceable> in <citerefentry
471 ><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>)</entry>
472 </row>
473 <row>
474 <entry><filename>$XDG_CONFIG_HOME/systemd/user</filename> or <filename>$HOME/.config/systemd/user</filename></entry>
475 <entry>User configuration (<varname>$XDG_CONFIG_HOME</varname> is used if set, <filename>~/.config</filename> otherwise)</entry>
476 </row>
477 <row>
478 <entry><filename>$XDG_CONFIG_DIRS/systemd/user</filename> or <filename>/etc/xdg/systemd/user</filename></entry>
479 <entry>Additional configuration directories as specified by the XDG base directory specification (<varname>$XDG_CONFIG_DIRS</varname> is used if set, <filename>/etc/xdg</filename> otherwise)</entry>
480 </row>
481 <row>
482 <entry><filename>/etc/systemd/user</filename></entry>
483 <entry>User units created by the administrator</entry>
484 </row>
485 <row>
486 <entry><filename>$XDG_RUNTIME_DIR/systemd/user</filename></entry>
487 <entry>Runtime units (only used when $XDG_RUNTIME_DIR is set)</entry>
488 </row>
489 <row>
490 <entry><filename>/run/systemd/user</filename></entry>
491 <entry>Runtime units</entry>
492 </row>
493 <row>
494 <entry><filename>$XDG_RUNTIME_DIR/systemd/generator</filename></entry>
495 <entry>Generated units with medium priority (see <replaceable>normal-dir</replaceable> in <citerefentry
496 ><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>)</entry>
497 </row>
498 <row>
499 <entry><filename>$XDG_DATA_HOME/systemd/user</filename> or <filename>$HOME/.local/share/systemd/user</filename></entry>
500 <entry>Units of packages that have been installed in the home directory (<varname>$XDG_DATA_HOME</varname> is used if set, <filename>~/.local/share</filename> otherwise)</entry>
501 </row>
502 <row>
503 <entry><filename>$XDG_DATA_DIRS/systemd/user</filename> or <filename>/usr/local/share/systemd/user</filename> and <filename>/usr/share/systemd/user</filename></entry>
504 <entry>Additional data directories as specified by the XDG base directory specification (<varname>$XDG_DATA_DIRS</varname> is used if set, <filename>/usr/local/share</filename> and <filename>/usr/share</filename> otherwise)</entry>
505 </row>
506 <row>
507 <entry><filename>$dir/systemd/user</filename> for each <varname index="false">$dir</varname> in <varname>$XDG_DATA_DIRS</varname></entry>
508 <entry>Additional locations for installed user units, one for each entry in <varname>$XDG_DATA_DIRS</varname></entry>
509 </row>
510 <row>
511 <entry><filename>/usr/local/lib/systemd/user</filename></entry>
512 <entry>User units installed by the administrator</entry>
513 </row>
514 <row>
515 <entry><filename>/usr/lib/systemd/user</filename></entry>
516 <entry>User units installed by the distribution package manager</entry>
517 </row>
518 <row>
519 <entry><filename>$XDG_RUNTIME_DIR/systemd/generator.late</filename></entry>
520 <entry>Generated units with low priority (see <replaceable>late-dir</replaceable> in <citerefentry
521 ><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>)</entry>
522 </row>
523 </tbody>
524 </tgroup>
525 </table>
526
527 <para>The set of load paths for the user manager instance may be augmented or
528 changed using various environment variables. And environment variables may in
529 turn be set using environment generators, see
530 <citerefentry><refentrytitle>systemd.environment-generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
531 In particular, <varname>$XDG_DATA_HOME</varname> and
532 <varname>$XDG_DATA_DIRS</varname> may be easily set using
533 <citerefentry><refentrytitle>systemd-environment-d-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
534 Thus, directories listed here are just the defaults. To see the actual list that
535 would be used based on compilation options and current environment use
536 <programlisting>systemd-analyze --user unit-paths</programlisting>
537 </para>
538
539 <para>Moreover, additional units might be loaded into systemd from directories not on the unit load path
540 by creating a symlink pointing to a unit file in the directories. You can use <command>systemctl
541 link</command> for this; see
542 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>. The file
543 system where the linked unit files are located must be accessible when systemd is started (e.g. anything
544 underneath <filename>/home/</filename> or <filename>/var/</filename> is not allowed, unless those
545 directories are located on the root file system).</para>
546
547 <para>It is important to distinguish "linked unit files" from "unit file aliases": any symlink where the
548 symlink <emphasis>target</emphasis> is within the unit load path becomes an alias: the source name and
549 the target file name must satisfy specific constraints listed above in the discussion of aliases, but the
550 symlink target does not have to exist, and in fact the symlink target path is not used, except to check
551 whether the target is within the unit load path. In contrast, a symlink which goes outside of the unit
552 load path signifies a linked unit file. The symlink is followed when loading the file, but the
553 destination name is otherwise unused (and may even not be a valid unit file name). For example, symlinks
554 <filename index='false'>/etc/systemd/system/alias1.service</filename> → <filename index='false'>service1.service</filename>,
555 <filename index='false'>/etc/systemd/system/alias2.service</filename> → <filename index='false'>/usr/lib/systemd/service1.service</filename>,
556 <filename index='false'>/etc/systemd/system/alias3.service</filename> → <filename index='false'>/etc/systemd/system/service1.service</filename>
557 are all valid aliases and <filename index='false'>service1.service</filename> will have
558 four names, even if the unit file is located at
559 <filename index='false'>/run/systemd/system/service1.service</filename>. In contrast,
560 a symlink <filename index='false'>/etc/systemd/system/link1.service</filename> → <filename index='false'>../link1_service_file</filename>
561 means that <filename index='false'>link1.service</filename> is a "linked unit" and the contents of
562 <filename index='false'>/etc/systemd/link1_service_file</filename> provide its configuration.</para>
563 </refsect1>
564
565 <refsect1>
566 <title>Unit Garbage Collection</title>
567
568 <para>The system and service manager loads a unit's configuration automatically when a unit is referenced for the
569 first time. It will automatically unload the unit configuration and state again when the unit is not needed anymore
570 ("garbage collection"). A unit may be referenced through a number of different mechanisms:</para>
571
572 <orderedlist>
573 <listitem><para>Another loaded unit references it with a dependency such as <varname>After=</varname>,
574 <varname>Wants=</varname>, …</para></listitem>
575
576 <listitem><para>The unit is currently starting, running, reloading or stopping.</para></listitem>
577
578 <listitem><para>The unit is currently in the <constant>failed</constant> state. (But see below.)</para></listitem>
579
580 <listitem><para>A job for the unit is pending.</para></listitem>
581
582 <listitem><para>The unit is pinned by an active IPC client program.</para></listitem>
583
584 <listitem><para>The unit is a special "perpetual" unit that is always active and loaded. Examples for perpetual
585 units are the root mount unit <filename>-.mount</filename> or the scope unit <filename>init.scope</filename> that
586 the service manager itself lives in.</para></listitem>
587
588 <listitem><para>The unit has running processes associated with it.</para></listitem>
589 </orderedlist>
590
591 <para>The garbage collection logic may be altered with the <varname>CollectMode=</varname> option, which allows
592 configuration whether automatic unloading of units that are in <constant>failed</constant> state is permissible,
593 see below.</para>
594
595 <para>Note that when a unit's configuration and state is unloaded, all execution results, such as exit codes, exit
596 signals, resource consumption and other statistics are lost, except for what is stored in the log subsystem.</para>
597
598 <para>Use <command>systemctl daemon-reload</command> or an equivalent command to reload unit configuration while
599 the unit is already loaded. In this case, all configuration settings are flushed out and replaced with the new
600 configuration (which however might not be in effect immediately), however all runtime state is
601 saved/restored.</para>
602 </refsect1>
603
604 <refsect1>
605 <title>[Unit] Section Options</title>
606
607 <para>The unit file may include a [Unit] section, which carries
608 generic information about the unit that is not dependent on the
609 type of unit:</para>
610
611 <variablelist class='unit-directives'>
612 <varlistentry>
613 <term><varname>Description=</varname></term>
614 <listitem><para>A brief, meaningful, human-readable text identifying the unit. This may be used by
615 <command>systemd</command> (and suitable UIs) as a user-visible label for the unit, so this string
616 should identify the unit rather than just describe it, despite the name. This string also should not
617 just repeat the unit name. <literal>Apache HTTP Server</literal> or <literal>Postfix Mail
618 Server</literal> are good examples. Bad examples are <literal>high-performance lightweight HTTP
619 server</literal> (too generic) or <literal>Apache</literal> (meaningless for people who do not know
620 the Apache HTTP server project, duplicates the unit name). <command>systemd</command> may use this
621 string as a noun in status messages (<literal>Starting
622 <replaceable>Description</replaceable>...</literal>, <literal>Started
623 <replaceable>Description</replaceable>.</literal>, <literal>Reached target
624 <replaceable>Description</replaceable>.</literal>, <literal>Failed to start
625 <replaceable>Description</replaceable>.</literal>), so it should be capitalized, and should not be a
626 full sentence, or a phrase with a verb conjugated in the present continuous, or end in a full
627 stop. Bad examples include <literal>exiting the container</literal>, <literal>updating the database
628 once per day.</literal>, or <literal>OpenSSH server second instance daemon</literal>.</para>
629
630 <xi:include href="version-info.xml" xpointer="v201"/>
631 </listitem>
632 </varlistentry>
633
634 <varlistentry>
635 <term><varname>Documentation=</varname></term>
636 <listitem><para>A space-separated list of URIs referencing
637 documentation for this unit or its configuration. Accepted are
638 only URIs of the types <literal>http://</literal>,
639 <literal>https://</literal>, <literal>file:</literal>,
640 <literal>info:</literal>, <literal>man:</literal>. For more
641 information about the syntax of these URIs, see <citerefentry
642 project='man-pages'><refentrytitle>uri</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
643 The URIs should be listed in order of relevance, starting with
644 the most relevant. It is a good idea to first reference
645 documentation that explains what the unit's purpose is,
646 followed by how it is configured, followed by any other
647 related documentation. This option may be specified more than
648 once, in which case the specified list of URIs is merged. If
649 the empty string is assigned to this option, the list is reset
650 and all prior assignments will have no
651 effect.</para>
652
653 <xi:include href="version-info.xml" xpointer="v201"/></listitem>
654 </varlistentry>
655
656 <varlistentry>
657 <term><varname>Wants=</varname></term>
658
659 <listitem><para>Configures (weak) requirement dependencies on other units. This option may be
660 specified more than once or multiple space-separated units may be specified in one option in which
661 case dependencies for all listed names will be created. Dependencies of this type may also be
662 configured outside of the unit configuration file by adding a symlink to a
663 <filename>.wants/</filename> directory accompanying the unit file. For details, see above.</para>
664
665 <para>Units listed in this option will be started if the configuring unit is. However, if the listed
666 units fail to start or cannot be added to the transaction, this has no impact on the validity of the
667 transaction as a whole, and this unit will still be started. This is the recommended way to hook
668 the start-up of one unit to the start-up of another unit.</para>
669
670 <para>Note that requirement dependencies do not influence the order in which services are started or
671 stopped. This has to be configured independently with the <varname>After=</varname> or
672 <varname>Before=</varname> options. If unit <filename>foo.service</filename> pulls in unit
673 <filename>bar.service</filename> as configured with <varname>Wants=</varname> and no ordering is
674 configured with <varname>After=</varname> or <varname>Before=</varname>, then both units will be
675 started simultaneously and without any delay between them if <filename>foo.service</filename> is
676 activated.</para>
677
678 <xi:include href="version-info.xml" xpointer="v201"/></listitem>
679 </varlistentry>
680
681 <varlistentry>
682 <term><varname>Requires=</varname></term>
683
684 <listitem><para>Similar to <varname>Wants=</varname>, but declares a stronger requirement
685 dependency. Dependencies of this type may also be configured by adding a symlink to a
686 <filename>.requires/</filename> directory accompanying the unit file.</para>
687
688 <para>If this unit gets activated, the units listed will be activated as well. If one of
689 the other units fails to activate, and an ordering dependency <varname>After=</varname> on the
690 failing unit is set, this unit will not be started. Besides, with or without specifying
691 <varname>After=</varname>, this unit will be stopped (or restarted) if one of the other units is
692 explicitly stopped (or restarted).</para>
693
694 <para>Often, it is a better choice to use <varname>Wants=</varname> instead of
695 <varname>Requires=</varname> in order to achieve a system that is more robust when dealing with
696 failing services.</para>
697
698 <para>Note that this dependency type does not imply that the other unit always has to be in active state when
699 this unit is running. Specifically: failing condition checks (such as <varname>ConditionPathExists=</varname>,
700 <varname>ConditionPathIsSymbolicLink=</varname>, … — see below) do not cause the start job of a unit with a
701 <varname>Requires=</varname> dependency on it to fail. Also, some unit types may deactivate on their own (for
702 example, a service process may decide to exit cleanly, or a device may be unplugged by the user), which is not
703 propagated to units having a <varname>Requires=</varname> dependency. Use the <varname>BindsTo=</varname>
704 dependency type together with <varname>After=</varname> to ensure that a unit may never be in active state
705 without a specific other unit also in active state (see below).</para>
706
707 <xi:include href="version-info.xml" xpointer="v201"/></listitem>
708 </varlistentry>
709
710 <varlistentry>
711 <term><varname>Requisite=</varname></term>
712
713 <listitem><para>Similar to <varname>Requires=</varname>. However, if the units listed here
714 are not started already, they will not be started and the starting of this unit will fail
715 immediately. <varname>Requisite=</varname> does not imply an ordering dependency, even if
716 both units are started in the same transaction. Hence this setting should usually be
717 combined with <varname>After=</varname>, to ensure this unit is not started before the other
718 unit.</para>
719
720 <para>When <varname>Requisite=b.service</varname> is used on
721 <filename>a.service</filename>, this dependency will show as
722 <varname>RequisiteOf=a.service</varname> in property listing of
723 <filename>b.service</filename>. <varname>RequisiteOf=</varname>
724 dependency cannot be specified directly.</para>
725
726 <xi:include href="version-info.xml" xpointer="v201"/>
727 </listitem>
728 </varlistentry>
729
730 <varlistentry>
731 <term><varname>BindsTo=</varname></term>
732
733 <listitem><para>Configures requirement dependencies, very similar in style to
734 <varname>Requires=</varname>. However, this dependency type is stronger: in addition to the effects of
735 <varname>Requires=</varname>, which already stops (or restarts) the configuring unit when a listed unit is
736 explicitly stopped (or restarted), it also does so when a listed unit stops unexpectedly (which includes when it
737 fails).
738 Units can suddenly, unexpectedly enter inactive state for different reasons: the main process of a service unit
739 might terminate on its own choice, the backing device of a device unit might be unplugged or the mount point of
740 a mount unit might be unmounted without involvement of the system and service manager.</para>
741
742 <para>When used in conjunction with <varname>After=</varname> on the same unit the behaviour of
743 <varname>BindsTo=</varname> is even stronger. In this case, the unit bound to strictly has to be in active
744 state for this unit to also be in active state. This not only means a unit bound to another unit that suddenly
745 enters inactive state, but also one that is bound to another unit that gets skipped due to an unmet condition
746 check (such as <varname>ConditionPathExists=</varname>, <varname>ConditionPathIsSymbolicLink=</varname>, … —
747 see below) will be stopped, should it be running. Hence, in many cases it is best to combine
748 <varname>BindsTo=</varname> with <varname>After=</varname>.</para>
749
750 <para>When <varname>BindsTo=b.service</varname> is used on
751 <filename>a.service</filename>, this dependency will show as
752 <varname>BoundBy=a.service</varname> in property listing of
753 <filename>b.service</filename>. <varname>BoundBy=</varname>
754 dependency cannot be specified directly.</para>
755
756 <xi:include href="version-info.xml" xpointer="v201"/>
757 </listitem>
758 </varlistentry>
759
760 <varlistentry>
761 <term><varname>PartOf=</varname></term>
762
763 <listitem><para>Configures dependencies similar to
764 <varname>Requires=</varname>, but limited to stopping and
765 restarting of units. When systemd stops or restarts the units
766 listed here, the action is propagated to this unit. Note that
767 this is a one-way dependency — changes to this unit do not
768 affect the listed units.</para>
769
770 <para>When <varname>PartOf=b.service</varname> is used on
771 <filename>a.service</filename>, this dependency will show as
772 <varname>ConsistsOf=a.service</varname> in property listing of
773 <filename>b.service</filename>. <varname>ConsistsOf=</varname>
774 dependency cannot be specified directly.</para>
775
776 <xi:include href="version-info.xml" xpointer="v201"/>
777 </listitem>
778 </varlistentry>
779
780 <varlistentry>
781 <term><varname>Upholds=</varname></term>
782
783 <listitem><para>Configures dependencies similar to <varname>Wants=</varname>, but as long as this unit
784 is up, all units listed in <varname>Upholds=</varname> are started whenever found to be inactive or
785 failed, and no job is queued for them. While a <varname>Wants=</varname> dependency on another unit
786 has a one-time effect when this units started, a <varname>Upholds=</varname> dependency on it has a
787 continuous effect, constantly restarting the unit if necessary. This is an alternative to the
788 <varname>Restart=</varname> setting of service units, to ensure they are kept running whatever
789 happens. The restart happens without delay, and usual per-unit rate-limit applies.</para>
790
791 <para>When <varname>Upholds=b.service</varname> is used on <filename>a.service</filename>, this
792 dependency will show as <varname>UpheldBy=a.service</varname> in the property listing of
793 <filename>b.service</filename>.</para>
794
795 <xi:include href="version-info.xml" xpointer="v249"/>
796 </listitem>
797 </varlistentry>
798
799 <varlistentry>
800 <term><varname>Conflicts=</varname></term>
801
802 <listitem><para>A space-separated list of unit names. Configures negative requirement
803 dependencies. If a unit has a <varname>Conflicts=</varname> requirement on a set of other units,
804 then starting it will stop all of them and starting any of them will stop it.</para>
805
806 <para>Note that this setting does not imply an ordering dependency, similarly to the
807 <varname>Wants=</varname> and <varname>Requires=</varname> dependencies described above. This means
808 that to ensure that the conflicting unit is stopped before the other unit is started, an
809 <varname>After=</varname> or <varname>Before=</varname> dependency must be declared. It does not
810 matter which of the two ordering dependencies is used, because stop jobs are always ordered before
811 start jobs, see the discussion in <varname>Before=</varname>/<varname>After=</varname> below.</para>
812
813 <para>If unit A that conflicts with unit B is scheduled to
814 be started at the same time as B, the transaction will either
815 fail (in case both are required parts of the transaction) or be
816 modified to be fixed (in case one or both jobs are not a
817 required part of the transaction). In the latter case, the job
818 that is not required will be removed, or in case both are
819 not required, the unit that conflicts will be started and the
820 unit that is conflicted is stopped.</para>
821
822 <xi:include href="version-info.xml" xpointer="v201"/></listitem>
823 </varlistentry>
824
825 <varlistentry>
826 <term><varname>Before=</varname></term>
827 <term><varname>After=</varname></term>
828
829 <listitem><para>These two settings expect a space-separated list of unit names. They may be specified
830 more than once, in which case dependencies for all listed names are created.</para>
831
832 <para>Those two settings configure ordering dependencies between units. If unit
833 <filename>foo.service</filename> contains the setting <option>Before=bar.service</option> and both
834 units are being started, <filename>bar.service</filename>'s start-up is delayed until
835 <filename>foo.service</filename> has finished starting up. <varname>After=</varname> is the inverse
836 of <varname>Before=</varname>, i.e. while <varname>Before=</varname> ensures that the configured unit
837 is started before the listed unit begins starting up, <varname>After=</varname> ensures the opposite,
838 that the listed unit is fully started up before the configured unit is started.</para>
839
840 <para>When two units with an ordering dependency between them are shut down, the inverse of the
841 start-up order is applied. I.e. if a unit is configured with <varname>After=</varname> on another
842 unit, the former is stopped before the latter if both are shut down. Given two units with any
843 ordering dependency between them, if one unit is shut down and the other is started up, the shutdown
844 is ordered before the start-up. It does not matter if the ordering dependency is
845 <varname>After=</varname> or <varname>Before=</varname>, in this case. It also does not matter which
846 of the two is shut down, as long as one is shut down and the other is started up; the shutdown is
847 ordered before the start-up in all cases. If two units have no ordering dependencies between them,
848 they are shut down or started up simultaneously, and no ordering takes place. It depends on the unit
849 type when precisely a unit has finished starting up. Most importantly, for service units start-up is
850 considered completed for the purpose of <varname>Before=</varname>/<varname>After=</varname> when all
851 its configured start-up commands have been invoked and they either failed or reported start-up
852 success. Note that this includes <varname>ExecStartPost=</varname> (or
853 <varname>ExecStopPost=</varname> for the shutdown case).</para>
854
855 <para>Note that those settings are independent of and orthogonal to the requirement dependencies as
856 configured by <varname>Requires=</varname>, <varname>Wants=</varname>, <varname>Requisite=</varname>,
857 or <varname>BindsTo=</varname>. It is a common pattern to include a unit name in both the
858 <varname>After=</varname> and <varname>Wants=</varname> options, in which case the unit listed will
859 be started before the unit that is configured with these options.</para>
860
861 <para>Note that <varname>Before=</varname> dependencies on device units have no effect and are not
862 supported. Devices generally become available as a result of an external hotplug event, and systemd
863 creates the corresponding device unit without delay.</para>
864
865 <xi:include href="version-info.xml" xpointer="v201"/></listitem>
866 </varlistentry>
867
868 <varlistentry>
869 <term><varname>OnFailure=</varname></term>
870
871 <listitem><para>A space-separated list of one or more units that are activated when this unit enters
872 the <literal>failed</literal> state.</para>
873
874 <xi:include href="version-info.xml" xpointer="v201"/></listitem>
875 </varlistentry>
876
877 <varlistentry>
878 <term><varname>OnSuccess=</varname></term>
879
880 <listitem><para>A space-separated list of one or more units that are activated when this unit enters
881 the <literal>inactive</literal> state.</para>
882
883 <xi:include href="version-info.xml" xpointer="v249"/></listitem>
884 </varlistentry>
885
886 <varlistentry>
887 <term><varname>PropagatesReloadTo=</varname></term>
888 <term><varname>ReloadPropagatedFrom=</varname></term>
889
890 <listitem><para>A space-separated list of one or more units to which reload requests from this unit
891 shall be propagated to, or units from which reload requests shall be propagated to this unit,
892 respectively. Issuing a reload request on a unit will automatically also enqueue reload requests on
893 all units that are linked to it using these two settings.</para>
894
895 <xi:include href="version-info.xml" xpointer="v201"/></listitem>
896 </varlistentry>
897
898 <varlistentry>
899 <term><varname>PropagatesStopTo=</varname></term>
900 <term><varname>StopPropagatedFrom=</varname></term>
901
902 <listitem><para>A space-separated list of one or more units to which stop requests from this unit
903 shall be propagated to, or units from which stop requests shall be propagated to this unit,
904 respectively. Issuing a stop request on a unit will automatically also enqueue stop requests on all
905 units that are linked to it using these two settings.</para>
906
907 <xi:include href="version-info.xml" xpointer="v249"/></listitem>
908 </varlistentry>
909
910 <varlistentry>
911 <term><varname>JoinsNamespaceOf=</varname></term>
912
913 <listitem><para>For units that start processes (such as service units), lists one or more other units
914 whose network and/or temporary file namespace to join. If this is specified on a unit (say,
915 <filename>a.service</filename> has <varname>JoinsNamespaceOf=b.service</varname>), then the inverse
916 dependency (<varname>JoinsNamespaceOf=a.service</varname> for b.service) is implied. This only
917 applies to unit types which support the <varname>PrivateNetwork=</varname>,
918 <varname>NetworkNamespacePath=</varname>, <varname>PrivateIPC=</varname>,
919 <varname>IPCNamespacePath=</varname>, and <varname>PrivateTmp=</varname> directives (see
920 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
921 details). If a unit that has this setting set is started, its processes will see the same
922 <filename>/tmp/</filename>, <filename>/var/tmp/</filename>, IPC namespace and network namespace as
923 one listed unit that is started. If multiple listed units are already started and these do not share
924 their namespace, then it is not defined which namespace is joined. Note that this setting only has an
925 effect if <varname>PrivateNetwork=</varname>/<varname>NetworkNamespacePath=</varname>,
926 <varname>PrivateIPC=</varname>/<varname>IPCNamespacePath=</varname> and/or
927 <varname>PrivateTmp=</varname> is enabled for both the unit that joins the namespace and the unit
928 whose namespace is joined.</para>
929
930 <xi:include href="version-info.xml" xpointer="v209"/></listitem>
931 </varlistentry>
932
933 <varlistentry>
934 <term><varname>RequiresMountsFor=</varname></term>
935
936 <listitem><para>Takes a space-separated list of absolute
937 paths. Automatically adds dependencies of type
938 <varname>Requires=</varname> and <varname>After=</varname> for
939 all mount units required to access the specified path.</para>
940
941 <para>Mount points marked with <option>noauto</option> are not
942 mounted automatically through <filename>local-fs.target</filename>,
943 but are still honored for the purposes of this option, i.e. they
944 will be pulled in by this unit.</para>
945
946 <xi:include href="version-info.xml" xpointer="v201"/></listitem>
947 </varlistentry>
948
949 <varlistentry>
950 <term><varname>WantsMountsFor=</varname></term>
951
952 <listitem><para>Same as <varname>RequiresMountsFor=</varname>,
953 but adds dependencies of type <varname>Wants=</varname> instead
954 of <varname>Requires=</varname>.</para>
955
956 <xi:include href="version-info.xml" xpointer="v256"/></listitem>
957 </varlistentry>
958
959 <varlistentry>
960 <term><varname>OnSuccessJobMode=</varname></term>
961 <term><varname>OnFailureJobMode=</varname></term>
962
963 <listitem><para>Takes a value of
964 <literal>fail</literal>,
965 <literal>replace</literal>,
966 <literal>replace-irreversibly</literal>,
967 <literal>isolate</literal>,
968 <literal>flush</literal>,
969 <literal>ignore-dependencies</literal> or
970 <literal>ignore-requirements</literal>.
971 <literal>OnFailureJobMode=</literal> defaults to
972 <literal>replace</literal>,
973 <literal>OnSuccessJobMode=</literal> defaults to
974 <literal>fail</literal>. Specifies how the units listed in
975 <varname>OnSuccess=</varname>/<varname>OnFailure=</varname> will be enqueued. See
976 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
977 <option>--job-mode=</option> option for details on the
978 possible values. If this is set to <literal>isolate</literal>,
979 only a single unit may be listed in
980 <varname>OnSuccess=</varname>/<varname>OnFailure=</varname>.</para>
981
982 <xi:include href="version-info.xml" xpointer="v209"/></listitem>
983 </varlistentry>
984
985 <varlistentry>
986 <term><varname>IgnoreOnIsolate=</varname></term>
987
988 <listitem><para>Takes a boolean argument. If <option>true</option>, this unit will not be stopped
989 when isolating another unit. Defaults to <option>false</option> for service, target, socket, timer,
990 and path units, and <option>true</option> for slice, scope, device, swap, mount, and automount
991 units.</para>
992
993 <xi:include href="version-info.xml" xpointer="v201"/></listitem>
994 </varlistentry>
995
996 <varlistentry>
997 <term><varname>StopWhenUnneeded=</varname></term>
998
999 <listitem><para>Takes a boolean argument. If
1000 <option>true</option>, this unit will be stopped when it is no
1001 longer used. Note that, in order to minimize the work to be
1002 executed, systemd will not stop units by default unless they
1003 are conflicting with other units, or the user explicitly
1004 requested their shut down. If this option is set, a unit will
1005 be automatically cleaned up if no other active unit requires
1006 it. Defaults to <option>false</option>.</para>
1007
1008 <xi:include href="version-info.xml" xpointer="v201"/></listitem>
1009 </varlistentry>
1010
1011 <varlistentry>
1012 <term><varname>RefuseManualStart=</varname></term>
1013 <term><varname>RefuseManualStop=</varname></term>
1014
1015 <listitem><para>Takes a boolean argument. If
1016 <option>true</option>, this unit can only be activated or
1017 deactivated indirectly. In this case, explicit start-up or
1018 termination requested by the user is denied, however if it is
1019 started or stopped as a dependency of another unit, start-up
1020 or termination will succeed. This is mostly a safety feature
1021 to ensure that the user does not accidentally activate units
1022 that are not intended to be activated explicitly, and not
1023 accidentally deactivate units that are not intended to be
1024 deactivated. These options default to
1025 <option>false</option>.</para>
1026
1027 <xi:include href="version-info.xml" xpointer="v201"/></listitem>
1028 </varlistentry>
1029
1030 <varlistentry>
1031 <term><varname>AllowIsolate=</varname></term>
1032
1033 <listitem><para>Takes a boolean argument. If
1034 <option>true</option>, this unit may be used with the
1035 <command>systemctl isolate</command> command. Otherwise, this
1036 will be refused. It probably is a good idea to leave this
1037 disabled except for target units that shall be used similar to
1038 runlevels in SysV init systems, just as a precaution to avoid
1039 unusable system states. This option defaults to
1040 <option>false</option>.</para>
1041
1042 <xi:include href="version-info.xml" xpointer="v201"/></listitem>
1043 </varlistentry>
1044
1045 <varlistentry>
1046 <term><varname>DefaultDependencies=</varname></term>
1047
1048 <listitem><para>Takes a boolean argument. If
1049 <option>yes</option>, (the default), a few default
1050 dependencies will implicitly be created for the unit. The
1051 actual dependencies created depend on the unit type. For
1052 example, for service units, these dependencies ensure that the
1053 service is started only after basic system initialization is
1054 completed and is properly terminated on system shutdown. See
1055 the respective man pages for details. Generally, only services
1056 involved with early boot or late shutdown should set this
1057 option to <option>no</option>. It is highly recommended to
1058 leave this option enabled for the majority of common units. If
1059 set to <option>no</option>, this option does not disable
1060 all implicit dependencies, just non-essential
1061 ones.</para>
1062
1063 <xi:include href="version-info.xml" xpointer="v201"/></listitem>
1064 </varlistentry>
1065
1066 <varlistentry>
1067 <term><varname>SurviveFinalKillSignal=</varname></term>
1068
1069 <listitem><para>Takes a boolean argument. Defaults to <option>no</option>. If <option>yes</option>,
1070 processes belonging to this unit will not be sent the final <literal>SIGTERM</literal> and
1071 <literal>SIGKILL</literal> signals during the final phase of the system shutdown process.
1072 This functionality replaces the older mechanism that allowed a program to set
1073 <literal>argv[0][0] = '@'</literal> as described at
1074 <ulink url="https://systemd.io/ROOT_STORAGE_DAEMONS">systemd and Storage Daemons for the Root File
1075 System</ulink>, which however continues to be supported.</para>
1076
1077 <xi:include href="version-info.xml" xpointer="v255"/></listitem>
1078 </varlistentry>
1079
1080 <varlistentry>
1081 <term><varname>CollectMode=</varname></term>
1082
1083 <listitem><para>Tweaks the "garbage collection" algorithm for this unit. Takes one of <option>inactive</option>
1084 or <option>inactive-or-failed</option>. If set to <option>inactive</option> the unit will be unloaded if it is
1085 in the <constant>inactive</constant> state and is not referenced by clients, jobs or other units — however it
1086 is not unloaded if it is in the <constant>failed</constant> state. In <option>failed</option> mode, failed
1087 units are not unloaded until the user invoked <command>systemctl reset-failed</command> on them to reset the
1088 <constant>failed</constant> state, or an equivalent command. This behaviour is altered if this option is set to
1089 <option>inactive-or-failed</option>: in this case, the unit is unloaded even if the unit is in a
1090 <constant>failed</constant> state, and thus an explicitly resetting of the <constant>failed</constant> state is
1091 not necessary. Note that if this mode is used unit results (such as exit codes, exit signals, consumed
1092 resources, …) are flushed out immediately after the unit completed, except for what is stored in the logging
1093 subsystem. Defaults to <option>inactive</option>.</para>
1094
1095 <para>Since v261, if <varname>FileDescriptorStorePreserve=</varname> is set to <option>yes</option>,
1096 and the unit has file descriptors stored, garbage collection will be disabled until the unit is
1097 removed, the service manager exits, or the file descriptors get <constant>EPOLLHUP</constant> or
1098 <constant>EPOLLERR</constant>.</para>
1099
1100 <xi:include href="version-info.xml" xpointer="v236"/>
1101 </listitem>
1102 </varlistentry>
1103
1104 <varlistentry>
1105 <term><varname>FailureAction=</varname></term>
1106 <term><varname>SuccessAction=</varname></term>
1107
1108 <listitem><para>Configure the action to take when the unit stops and enters a failed state or
1109 inactive state. Takes one of <option>none</option>, <option>reboot</option>,
1110 <option>reboot-force</option>, <option>reboot-immediate</option>, <option>poweroff</option>,
1111 <option>poweroff-force</option>, <option>poweroff-immediate</option>, <option>exit</option>,
1112 <option>exit-force</option>, <option>soft-reboot</option>, <option>soft-reboot-force</option>,
1113 <option>kexec</option>, <option>kexec-force</option>, <option>halt</option>,
1114 <option>halt-force</option> and <option>halt-immediate</option>. In system mode, all options are
1115 allowed. In user mode, only <option>none</option>, <option>exit</option>, and
1116 <option>exit-force</option> are allowed. Both options default to <option>none</option>.</para>
1117
1118 <para>These actions are tied to the unit's state transitions and fire only when the unit actually
1119 transitions out of an <constant>active</constant> or <constant>activating</constant> state. As a
1120 consequence, <varname>Condition…=</varname> and <varname>Assert…=</varname> directives that fail do
1121 <emphasis>not</emphasis> trigger <varname>SuccessAction=</varname> or
1122 <varname>FailureAction=</varname>: they prevent activation in the first place, so no state transition
1123 occurs. By contrast, the <varname>ExecCondition=</varname> directive in
1124 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1125 runs as part of activation, so an <varname>ExecCondition=</varname> skip <emphasis>will</emphasis>
1126 trigger <varname>SuccessAction=</varname>.</para>
1127
1128 <para>If <option>none</option> is set, no action will be triggered. <option>reboot</option> causes a
1129 reboot following the normal shutdown procedure (i.e. equivalent to <command>systemctl
1130 reboot</command>). <option>reboot-force</option> causes a forced reboot which will terminate all
1131 processes forcibly but should cause no dirty file systems on reboot (i.e. equivalent to
1132 <command>systemctl reboot -f</command>) and <option>reboot-immediate</option> causes immediate
1133 execution of the
1134 <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry> system
1135 call, which might result in data loss (i.e. equivalent to <command>systemctl reboot -ff</command>).
1136 Similarly, <option>poweroff</option>, <option>poweroff-force</option>,
1137 <option>poweroff-immediate</option>, <option>kexec</option>, <option>kexec-force</option>,
1138 <option>halt</option>, <option>halt-force</option> and <option>halt-immediate</option> have the
1139 effect of powering down the system, executing kexec, and halting the system respectively with similar
1140 semantics. <option>exit</option> causes the manager to exit following the normal shutdown procedure,
1141 and <option>exit-force</option> causes it terminate without shutting down services. When
1142 <option>exit</option> or <option>exit-force</option> is used by default the exit status of the main
1143 process of the unit (if this applies) is returned from the service manager. However, this may be
1144 overridden with
1145 <varname>FailureActionExitStatus=</varname>/<varname>SuccessActionExitStatus=</varname>, see below.
1146 <option>soft-reboot</option> will trigger a userspace reboot operation.
1147 <option>soft-reboot-force</option> does that too, but does not go through the shutdown transaction
1148 beforehand.</para>
1149
1150 <xi:include href="version-info.xml" xpointer="v236"/></listitem>
1151 </varlistentry>
1152
1153 <varlistentry>
1154 <term><varname>FailureActionExitStatus=</varname></term>
1155 <term><varname>SuccessActionExitStatus=</varname></term>
1156
1157 <listitem><para>Controls the exit status to propagate back to an invoking container manager (in case of a
1158 system service) or service manager (in case of a user manager) when the
1159 <varname>FailureAction=</varname>/<varname>SuccessAction=</varname> are set to <option>exit</option> or
1160 <option>exit-force</option> and the action is triggered. By default, the exit status of the main process of the
1161 triggering unit (if this applies) is propagated. Takes a value in the range 0…255 or the empty string to
1162 request default behaviour.</para>
1163
1164 <xi:include href="version-info.xml" xpointer="v240"/></listitem>
1165 </varlistentry>
1166
1167 <varlistentry>
1168 <term><varname>JobTimeoutSec=</varname></term>
1169 <term><varname>JobRunningTimeoutSec=</varname></term>
1170
1171 <listitem><para><varname>JobTimeoutSec=</varname> specifies a timeout for the whole job that starts
1172 running when the job is queued. <varname>JobRunningTimeoutSec=</varname> specifies a timeout that
1173 starts running when the queued job is actually started. If either limit is reached, the job will be
1174 cancelled, the unit however will not change state or even enter the <literal>failed</literal> mode.
1175 </para>
1176
1177 <para>Both settings take a time span with the default unit of seconds, but other units may be
1178 specified, see
1179 <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
1180 The default is <literal>infinity</literal> (job timeouts disabled), except for device units where
1181 <varname>JobRunningTimeoutSec=</varname> defaults to <varname>DefaultDeviceTimeoutSec=</varname>.
1182 </para>
1183
1184 <para>Note: these timeouts are independent from any unit-specific timeouts (for example, the timeout
1185 set with <varname>TimeoutStartSec=</varname> in service units). The job timeout has no effect on the
1186 unit itself. Or in other words: unit-specific timeouts are useful to abort unit state changes, and
1187 revert them. The job timeout set with this option however is useful to abort only the job waiting for
1188 the unit state to change.</para>
1189
1190 <xi:include href="version-info.xml" xpointer="v201"/>
1191 </listitem>
1192 </varlistentry>
1193
1194 <varlistentry>
1195 <term><varname>JobTimeoutAction=</varname></term>
1196 <term><varname>JobTimeoutRebootArgument=</varname></term>
1197
1198 <listitem><para><varname>JobTimeoutAction=</varname> optionally configures an additional action to
1199 take when the timeout is hit, see description of <varname>JobTimeoutSec=</varname> and
1200 <varname>JobRunningTimeoutSec=</varname> above. It takes the same values as
1201 <varname>FailureAction=</varname>/<varname>SuccessAction=</varname>. Defaults to
1202 <option>none</option>.</para>
1203
1204 <para><varname>JobTimeoutRebootArgument=</varname> configures an optional reboot string to pass to
1205 the <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry> system
1206 call.</para>
1207
1208 <xi:include href="version-info.xml" xpointer="v240"/></listitem>
1209 </varlistentry>
1210
1211 <varlistentry>
1212 <term><varname>StartLimitIntervalSec=<replaceable>interval</replaceable></varname></term>
1213 <term><varname>StartLimitBurst=<replaceable>burst</replaceable></varname></term>
1214
1215 <listitem><para>Configure unit start rate limiting. Units which are started more than
1216 <replaceable>burst</replaceable> times within an <replaceable>interval</replaceable> time span are
1217 not permitted to start any more. Use <varname>StartLimitIntervalSec=</varname> to configure the
1218 checking interval and <varname>StartLimitBurst=</varname> to configure how many starts per interval
1219 are allowed.</para>
1220
1221 <para><replaceable>interval</replaceable> is a time span with the default unit of seconds, but other
1222 units may be specified, see
1223 <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
1224 The special value <literal>infinity</literal> can be used to limit the total number of start
1225 attempts, even if they happen at large time intervals.
1226 Defaults to <varname>DefaultStartLimitIntervalSec=</varname> in manager configuration file, and may
1227 be set to 0 to disable any kind of rate limiting. <replaceable>burst</replaceable> is a number and
1228 defaults to <varname>DefaultStartLimitBurst=</varname> in manager configuration file.</para>
1229
1230 <para>These configuration options are particularly useful in conjunction with the service setting
1231 <varname>Restart=</varname> (see
1232 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>);
1233 however, they apply to all kinds of starts (including manual), not just those triggered by the
1234 <varname>Restart=</varname> logic.</para>
1235
1236 <para>Note that units which are configured for <varname>Restart=</varname>, and which reach the start
1237 limit are not attempted to be restarted anymore; however, they may still be restarted manually or
1238 from a timer or socket at a later point, after the <replaceable>interval</replaceable> has passed.
1239 From that point on, the restart logic is activated again. <command>systemctl reset-failed</command>
1240 will cause the restart rate counter for a service to be flushed, which is useful if the administrator
1241 wants to manually start a unit and the start limit interferes with that. Rate-limiting is enforced
1242 after any unit condition checks are executed, and hence unit activations with failing conditions do
1243 not count towards the rate limit.</para>
1244
1245 <para>When a unit is unloaded due to the garbage collection logic (see above) its rate limit counters
1246 are flushed out too. This means that configuring start rate limiting for a unit that is not
1247 referenced continuously has no effect.</para>
1248
1249 <para>This setting does not apply to slice, target, device, and scope units, since they are unit
1250 types whose activation may either never fail, or may succeed only a single time.</para>
1251
1252 <xi:include href="version-info.xml" xpointer="v229"/></listitem>
1253 </varlistentry>
1254
1255 <varlistentry>
1256 <term><varname>StartLimitAction=</varname></term>
1257
1258 <listitem><para>Configure an additional action to take if the rate limit configured with
1259 <varname>StartLimitIntervalSec=</varname> and <varname>StartLimitBurst=</varname> is hit. Takes the same
1260 values as the <varname>FailureAction=</varname>/<varname>SuccessAction=</varname> settings. If
1261 <option>none</option> is set, hitting the rate limit will trigger no action except that
1262 the start will not be permitted. Defaults to <option>none</option>.</para>
1263
1264 <xi:include href="version-info.xml" xpointer="v229"/></listitem>
1265 </varlistentry>
1266
1267 <varlistentry>
1268 <term><varname>RebootArgument=</varname></term>
1269 <listitem><para>Configure the optional argument for the
1270 <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry> system call if
1271 <varname>StartLimitAction=</varname> or <varname>FailureAction=</varname> is a reboot action. This
1272 works just like the optional argument to <command>systemctl reboot</command> command.</para>
1273
1274 <xi:include href="version-info.xml" xpointer="v229"/></listitem>
1275 </varlistentry>
1276
1277 <varlistentry>
1278 <term><varname>SourcePath=</varname></term>
1279 <listitem><para>A path to a configuration file this unit has
1280 been generated from. This is primarily useful for
1281 implementation of generator tools that convert configuration
1282 from an external configuration file format into native unit
1283 files. This functionality should not be used in normal
1284 units.</para>
1285
1286 <xi:include href="version-info.xml" xpointer="v201"/></listitem>
1287 </varlistentry>
1288 </variablelist>
1289
1290 <refsect2>
1291 <title>Conditions and Asserts</title>
1292
1293 <para>Unit files may also include a number of <varname index="false">Condition…=</varname> and <varname
1294 index="false">Assert…=</varname> settings. Before the unit is started, systemd will verify that the
1295 specified conditions and asserts are true. If not, the starting of the unit will be (mostly silently)
1296 skipped (in case of conditions), or aborted with an error message (in case of asserts). Failing
1297 conditions or asserts will not result in the unit being moved into the <literal>failed</literal>
1298 state. The conditions and asserts are checked at the time the queued start job is to be executed. The
1299 ordering dependencies are still respected, so other units are still pulled in and ordered as if this
1300 unit was successfully activated, and the conditions and asserts are executed the precise moment the
1301 unit would normally start and thus can validate system state after the units ordered before completed
1302 initialization. Use condition expressions for skipping units that do not apply to the local system, for
1303 example because the kernel or runtime environment does not require their functionality.
1304 </para>
1305
1306 <para>If multiple conditions are specified, the unit will be executed if all of them apply (i.e. a
1307 logical AND is applied). Condition checks can use a pipe symbol (<literal>|</literal>) after the equals
1308 sign (<literal>Condition…=|…</literal>), which causes the condition to become a
1309 <emphasis>triggering</emphasis> condition. If at least one triggering condition is defined for a unit,
1310 then the unit will be started if at least one of the triggering conditions of the unit applies and all
1311 of the regular (i.e. non-triggering) conditions apply. If you prefix an argument with the pipe symbol
1312 and an exclamation mark, the pipe symbol must be passed first, the exclamation second. If any of these
1313 options is assigned the empty string, the list of conditions is reset completely, all previous
1314 condition settings (of any kind) will have no effect.</para>
1315
1316 <para>The <varname>AssertArchitecture=</varname>, <varname>AssertVirtualization=</varname>, … options
1317 are similar to conditions but cause the start job to fail (instead of being skipped). The failed check
1318 is logged. Units with unmet conditions are considered to be in a clean state and will be garbage
1319 collected if they are not referenced. This means that when queried, the condition failure may or may
1320 not show up in the state of the unit.</para>
1321
1322 <para>Note that neither assertion nor condition expressions result in unit state changes. Also note
1323 that both are checked at the time the job is to be executed, i.e. long after depending jobs and it
1324 itself were queued. Thus, neither condition nor assertion expressions are suitable for conditionalizing
1325 unit dependencies.</para>
1326
1327 <para>The <command>condition</command> verb of
1328 <citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry> can
1329 be used to test condition and assert expressions.</para>
1330
1331 <para>Except for <varname>ConditionPathIsSymbolicLink=</varname>, all path checks follow symlinks.</para>
1332
1333 <variablelist class='unit-directives'>
1334 <varlistentry>
1335 <term><varname>ConditionArchitecture=</varname></term>
1336
1337 <listitem><para>Check whether the system is running on a specific architecture. Takes one of
1338 <literal>x86</literal>,
1339 <literal>x86-64</literal>,
1340 <literal>ppc</literal>,
1341 <literal>ppc-le</literal>,
1342 <literal>ppc64</literal>,
1343 <literal>ppc64-le</literal>,
1344 <literal>ia64</literal>,
1345 <literal>parisc</literal>,
1346 <literal>parisc64</literal>,
1347 <literal>s390</literal>,
1348 <literal>s390x</literal>,
1349 <literal>sparc</literal>,
1350 <literal>sparc64</literal>,
1351 <literal>mips</literal>,
1352 <literal>mips-le</literal>,
1353 <literal>mips64</literal>,
1354 <literal>mips64-le</literal>,
1355 <literal>alpha</literal>,
1356 <literal>arm</literal>,
1357 <literal>arm-be</literal>,
1358 <literal>arm64</literal>,
1359 <literal>arm64-be</literal>,
1360 <literal>sh</literal>,
1361 <literal>sh64</literal>,
1362 <literal>m68k</literal>,
1363 <literal>tilegx</literal>,
1364 <literal>cris</literal>,
1365 <literal>arc</literal>,
1366 <literal>arc-be</literal>, or
1367 <literal>native</literal>.</para>
1368
1369 <para>Use
1370 <citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1371 for the complete list of known architectures.</para>
1372
1373 <para>The architecture is determined from the information returned by
1374 <citerefentry project='man-pages'><refentrytitle>uname</refentrytitle><manvolnum>2</manvolnum></citerefentry>
1375 and is thus subject to
1376 <citerefentry><refentrytitle>personality</refentrytitle><manvolnum>2</manvolnum></citerefentry>.
1377 Note that a <varname>Personality=</varname> setting in the same unit file has no effect on this
1378 condition. A special architecture name <literal>native</literal> is mapped to the architecture the
1379 system manager itself is compiled for. The test may be negated by prepending an exclamation
1380 mark.</para>
1381
1382 <xi:include href="version-info.xml" xpointer="v201"/>
1383 </listitem>
1384 </varlistentry>
1385
1386 <varlistentry>
1387 <term><varname>ConditionFirmware=</varname></term>
1388
1389 <listitem><para>Check whether the system's firmware is of a certain type. The following values are
1390 possible:</para>
1391
1392 <itemizedlist>
1393 <listitem><para><literal>uefi</literal> matches systems with EFI.</para></listitem>
1394
1395 <listitem><para><literal>device-tree</literal> matches systems with a device tree.
1396 </para></listitem>
1397
1398 <listitem><para><literal>device-tree-compatible(<replaceable>value</replaceable>)</literal>
1399 matches systems with a device tree that are compatible with <literal>value</literal>.
1400 </para></listitem>
1401
1402 <listitem><para><literal>smbios-field(<replaceable>field</replaceable>
1403 <replaceable>operator</replaceable> <replaceable>value</replaceable>)</literal> matches systems
1404 with a SMBIOS field containing a certain value. <replaceable>field</replaceable> is the name of
1405 the SMBIOS field exposed as <literal>sysfs</literal> attribute file below
1406 <filename>/sys/class/dmi/id/</filename>. <replaceable>operator</replaceable> is one of
1407 <literal>&lt;</literal>, <literal>&lt;=</literal>, <literal>&gt;=</literal>,
1408 <literal>&gt;</literal>, <literal>==</literal>, <literal>&lt;&gt;</literal> for version
1409 comparisons, <literal>=</literal> and <literal>!=</literal> for literal string comparisons, or
1410 <literal>$=</literal>, <literal>!$=</literal> for shell-style glob comparisons.
1411 <replaceable>value</replaceable> is the expected value of the SMBIOS field value (possibly
1412 containing shell style globs in case <literal>$=</literal>/<literal>!$=</literal> is used).
1413 </para></listitem>
1414 </itemizedlist>
1415
1416 <xi:include href="version-info.xml" xpointer="v249"/></listitem>
1417 </varlistentry>
1418
1419 <varlistentry>
1420 <term><varname>ConditionVirtualization=</varname></term>
1421
1422 <listitem><para>Check whether the system is executed in a virtualized environment and optionally
1423 test whether it is a specific implementation. Takes either boolean value to check if being executed
1424 in any virtualized environment, or one of
1425 <literal>vm</literal> and
1426 <literal>container</literal> to test against a generic type of virtualization solution, or one of
1427 <literal>qemu</literal>,
1428 <literal>kvm</literal>,
1429 <literal>amazon</literal>,
1430 <literal>zvm</literal>,
1431 <literal>vmware</literal>,
1432 <literal>microsoft</literal>,
1433 <literal>oracle</literal>,
1434 <literal>powervm</literal>,
1435 <literal>xen</literal>,
1436 <literal>bochs</literal>,
1437 <literal>uml</literal>,
1438 <literal>bhyve</literal>,
1439 <literal>qnx</literal>,
1440 <literal>apple</literal>,
1441 <literal>sre</literal>,
1442 <literal>openvz</literal>,
1443 <literal>lxc</literal>,
1444 <literal>lxc-libvirt</literal>,
1445 <literal>systemd-nspawn</literal>,
1446 <literal>docker</literal>,
1447 <literal>podman</literal>,
1448 <literal>rkt</literal>,
1449 <literal>wsl</literal>,
1450 <literal>proot</literal>,
1451 <literal>pouch</literal>,
1452 <literal>acrn</literal> to test
1453 against a specific implementation, or
1454 <literal>private-users</literal> to check whether we are running in a user namespace. See
1455 <citerefentry><refentrytitle>systemd-detect-virt</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1456 for a full list of known virtualization technologies and their identifiers. If multiple
1457 virtualization technologies are nested, only the innermost is considered. The test may be negated
1458 by prepending an exclamation mark.</para>
1459
1460 <xi:include href="version-info.xml" xpointer="v244"/>
1461 </listitem>
1462 </varlistentry>
1463
1464 <varlistentry>
1465 <term><varname>ConditionHost=</varname></term>
1466
1467 <listitem><para><varname>ConditionHost=</varname> may be used to match against the hostname,
1468 machine ID, boot ID or product UUID of the host. This either takes a hostname string (optionally
1469 with shell style globs) which is tested against the locally set hostname as returned by
1470 <citerefentry><refentrytitle>gethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>, or
1471 a 128bit ID or UUID, formatted as string. The latter is compared against machine ID, boot ID and the
1472 firmware product UUID if there is any. See
1473 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
1474 details about the machine ID. The test may be negated by prepending an exclamation mark.</para>
1475
1476 <xi:include href="version-info.xml" xpointer="v244"/>
1477 </listitem>
1478 </varlistentry>
1479
1480 <varlistentry>
1481 <term><varname>ConditionFraction=</varname></term>
1482
1483 <listitem><para><varname>ConditionFraction=</varname> may be used to enable a unit on a stable,
1484 pseudo-random subset of a fleet of machines. It is primarily useful for staged rollouts: the same
1485 unit (or drop-in) is distributed to every machine in a fleet, but only the configured fraction of
1486 them will actually have it enabled. The decision is derived locally from the machine ID (see
1487 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>), so
1488 it requires no central coordination and is stable over time: a given machine always lands on the
1489 same side of the threshold.</para>
1490
1491 <para>The argument consists of an optional <replaceable>tag</replaceable> followed by a percentage,
1492 separated by whitespace, for example <literal>30%</literal> or
1493 <literal>myrollout 30%</literal>. The percentage may include up to two decimal places (e.g.
1494 <literal>0.5%</literal>). The condition is satisfied on approximately the configured percentage of
1495 all machines; <literal>0%</literal> matches no machine and <literal>100%</literal> matches every
1496 machine.</para>
1497
1498 <para>The optional tag is an arbitrary string (not containing whitespace) that is mixed into the
1499 derivation, so that independent rollouts select <emphasis>independent</emphasis> subsets of the
1500 fleet. Without it, all untagged <varname>ConditionFraction=</varname> checks would select the very
1501 same machines (the same machines would always be picked first). Use distinct tags for unrelated
1502 rollouts, and a shared tag to deliberately target the same machines across several units.</para>
1503
1504 <para>The test may be negated by prepending an exclamation mark, in which case it is satisfied on the
1505 complementary fraction of machines (e.g. <literal>!myrollout 30%</literal> matches the other ≈70%).
1506 If the machine ID cannot be determined, the condition fails.</para>
1507
1508 <xi:include href="version-info.xml" xpointer="v261"/>
1509 </listitem>
1510 </varlistentry>
1511
1512 <varlistentry>
1513 <term><varname>ConditionKernelCommandLine=</varname></term>
1514
1515 <listitem><para><varname>ConditionKernelCommandLine=</varname> may be used to check whether a
1516 specific kernel command line option is set (or if prefixed with the exclamation mark — unset). The
1517 argument must either be a single word, or an assignment (i.e. two words, separated by
1518 <literal>=</literal>). In the former case the kernel command line is searched for the word
1519 appearing as is, or as left hand side of an assignment. In the latter case, the exact assignment is
1520 looked for with right and left hand side matching. This operates on the kernel command line
1521 communicated to userspace via <filename>/proc/cmdline</filename>, except when the service manager
1522 is invoked as payload of a container manager, in which case the command line of <filename>PID
1523 1</filename> is used instead (i.e. <filename>/proc/1/cmdline</filename>).</para>
1524
1525 <xi:include href="version-info.xml" xpointer="v244"/>
1526 </listitem>
1527 </varlistentry>
1528
1529 <varlistentry>
1530 <term><varname>ConditionKernelVersion=</varname></term>
1531
1532 <listitem><para><varname>ConditionKernelVersion=</varname> may be used to check whether the kernel
1533 version (as reported by <command>uname -r</command>) matches a certain expression, or if prefixed
1534 with the exclamation mark, does not match. The argument must be a list of (potentially quoted)
1535 expressions. Each expression starts with one of <literal>=</literal> or <literal>!=</literal> for
1536 string comparisons, <literal>&lt;</literal>, <literal>&lt;=</literal>, <literal>==</literal>,
1537 <literal>&lt;&gt;</literal>, <literal>&gt;=</literal>, <literal>&gt;</literal> for version
1538 comparisons, or <literal>$=</literal>, <literal>!$=</literal> for a shell-style glob match. If no
1539 operator is specified, <literal>$=</literal> is implied.</para>
1540
1541 <para>Note that using the kernel version string is an unreliable way to determine which features
1542 are supported by a kernel, because of the widespread practice of backporting drivers, features, and
1543 fixes from newer upstream kernels into older versions provided by distributions. Hence, this check
1544 is inherently unportable and should not be used for units which may be used on different
1545 distributions.</para>
1546
1547 <xi:include href="version-info.xml" xpointer="v244"/>
1548 </listitem>
1549 </varlistentry>
1550
1551 <varlistentry>
1552 <term><varname>ConditionVersion=</varname></term>
1553
1554 <listitem><para><varname>ConditionVersion=</varname> may be used to check whether a software
1555 version matches a certain expression, or if prefixed with the exclamation mark, does not match.
1556 The first argument is the software whose version has to be checked. Currently
1557 <literal>kernel</literal>, <literal>systemd</literal> and <literal>glibc</literal> are supported.
1558 If this argument is omitted, <literal>kernel</literal> is implied. The second argument must be a
1559 list of (potentially quoted) expressions. Each expression starts with one of <literal>=</literal>
1560 or <literal>!=</literal> for string comparisons, <literal>&lt;</literal>, <literal>&lt;=</literal>,
1561 <literal>==</literal>, <literal>&lt;&gt;</literal>, <literal>&gt;=</literal>,
1562 <literal>&gt;</literal> for version comparisons, or <literal>$=</literal>, <literal>!$=</literal>
1563 for a shell-style glob match. If no operator is specified, <literal>$=</literal> is implied.</para>
1564
1565 <xi:include href="version-info.xml" xpointer="v258"/>
1566 </listitem>
1567 </varlistentry>
1568
1569 <varlistentry>
1570 <term><varname>ConditionCredential=</varname></term>
1571
1572 <listitem><para><varname>ConditionCredential=</varname> may be used to check whether a credential
1573 by the specified name was passed into the service manager. See <ulink
1574 url="https://systemd.io/CREDENTIALS">System and Service Credentials</ulink> for details about
1575 credentials. If used in services for the system service manager this may be used to conditionalize
1576 services based on system credentials passed in. If used in services for the per-user service
1577 manager this may be used to conditionalize services based on credentials passed into the
1578 <filename>[email protected]</filename> service instance belonging to the user. The argument must be a
1579 valid credential name.</para>
1580
1581 <xi:include href="version-info.xml" xpointer="v252"/></listitem>
1582 </varlistentry>
1583
1584 <varlistentry>
1585 <term><varname>ConditionEnvironment=</varname></term>
1586
1587 <listitem><para><varname>ConditionEnvironment=</varname> may be used to check whether a specific
1588 environment variable is set (or if prefixed with the exclamation mark — unset) in the service
1589 manager's environment block.
1590
1591 The argument may be a single word, to check if the variable with this name is defined in the
1592 environment block, or an assignment
1593 (<literal><replaceable>name</replaceable>=<replaceable>value</replaceable></literal>), to check if
1594 the variable with this exact value is defined. Note that the environment block of the service
1595 manager itself is checked, i.e. not any variables defined with <varname>Environment=</varname> or
1596 <varname>EnvironmentFile=</varname>, as described above. This is particularly useful when the
1597 service manager runs inside a containerized environment or as per-user service manager, in order to
1598 check for variables passed in by the enclosing container manager or PAM.</para>
1599
1600 <xi:include href="version-info.xml" xpointer="v246"/>
1601 </listitem>
1602 </varlistentry>
1603
1604 <varlistentry>
1605 <term><varname>ConditionSecurity=</varname></term>
1606
1607 <listitem><para><varname>ConditionSecurity=</varname> may be used to check whether the given
1608 security technology is enabled on the system. Currently, the following values are recognized:</para>
1609
1610 <table>
1611 <title>Recognized security technologies</title>
1612
1613 <tgroup cols='2'>
1614 <colspec colname='value'/>
1615 <colspec colname='description'/>
1616
1617 <thead>
1618 <row>
1619 <entry>Value</entry>
1620 <entry>Description</entry>
1621 </row>
1622 </thead>
1623 <tbody>
1624 <row>
1625 <entry>selinux</entry>
1626 <entry>SELinux MAC</entry>
1627 </row>
1628 <row>
1629 <entry>apparmor</entry>
1630 <entry>AppArmor MAC</entry>
1631 </row>
1632 <row>
1633 <entry>tomoyo</entry>
1634 <entry>Tomoyo MAC</entry>
1635 </row>
1636 <row>
1637 <entry>smack</entry>
1638 <entry>SMACK MAC</entry>
1639 </row>
1640 <row>
1641 <entry>ima</entry>
1642 <entry>Integrity Measurement Architecture (IMA)</entry>
1643 </row>
1644 <row>
1645 <entry>audit</entry>
1646 <entry>Linux Audit Framework</entry>
1647 </row>
1648 <row>
1649 <entry>uefi-secureboot</entry>
1650 <entry>UEFI SecureBoot</entry>
1651 </row>
1652 <row>
1653 <entry>tpm2</entry>
1654 <entry>Trusted Platform Module 2.0 (TPM2) (with full UEFI support, including the TCG PC Client
1655 Platform Firmware Profile)</entry>
1656 </row>
1657 <row>
1658 <entry>cvm</entry>
1659 <entry>Confidential virtual machine (SEV/TDX)</entry>
1660 </row>
1661 <row>
1662 <entry>measured-uki</entry>
1663 <entry>Unified Kernel Image with PCR 11 Measurements, as per <citerefentry><refentrytitle>systemd-stub</refentrytitle><manvolnum>7</manvolnum></citerefentry>. <xi:include href="version-info.xml" xpointer="v255"/></entry>
1664 </row>
1665 <row>
1666 <entry>measured-os</entry>
1667 <entry>OS PCR measurements enabled. This is typically equivalent to <varname>measured-uki</varname>, however may also be set explicitly via the <varname>systemd.tpm2_measured_os=</varname> kernel command line switch, see <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry> for details. The various system services doing boot and runtime measurements are conditioned on this flag. <xi:include href="version-info.xml" xpointer="v261"/></entry>
1668 </row>
1669 </tbody>
1670 </tgroup>
1671 </table>
1672
1673 <para>The test may be negated by prepending an exclamation mark.</para>
1674
1675 <xi:include href="version-info.xml" xpointer="v244"/>
1676 </listitem>
1677 </varlistentry>
1678
1679 <varlistentry>
1680 <term><varname>ConditionCapability=</varname></term>
1681
1682 <listitem><para>Check whether the given capability exists in the capability bounding set of the
1683 service manager (i.e. this does not check whether capability is actually available in the permitted
1684 or effective sets, see
1685 <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
1686 for details). Pass a capability name such as <literal>CAP_MKNOD</literal>, possibly prefixed with
1687 an exclamation mark to negate the check.</para>
1688
1689 <xi:include href="version-info.xml" xpointer="v244"/>
1690 </listitem>
1691 </varlistentry>
1692
1693 <varlistentry>
1694 <term><varname>ConditionACPower=</varname></term>
1695
1696 <listitem><para>Check whether the system has AC power, or is exclusively battery powered at the
1697 time of activation of the unit. This takes a boolean argument. If set to <literal>true</literal>,
1698 the condition will hold only if at least one AC connector of the system is connected to a power
1699 source, or if no AC connectors are known. Conversely, if set to <literal>false</literal>, the
1700 condition will hold only if there is at least one AC connector known and all AC connectors are
1701 disconnected from a power source.</para>
1702
1703 <xi:include href="version-info.xml" xpointer="v244"/>
1704 </listitem>
1705 </varlistentry>
1706
1707 <varlistentry>
1708 <term><varname>ConditionNeedsUpdate=</varname></term>
1709
1710 <listitem><para>Takes one of <filename>/var/</filename> or <filename>/etc/</filename> as argument,
1711 possibly prefixed with a <literal>!</literal> (to invert the condition). This condition may be
1712 used to conditionalize units on whether the specified directory requires an update because
1713 <filename>/usr/</filename>'s modification time is newer than the stamp file
1714 <filename>.updated</filename> in the specified directory. This is useful to implement offline
1715 updates of the vendor operating system resources in <filename>/usr/</filename> that require updating
1716 of <filename>/etc/</filename> or <filename>/var/</filename> on the next following boot. Units making
1717 use of this condition should order themselves before
1718 <citerefentry><refentrytitle>systemd-update-done.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1719 to make sure they run before the stamp file's modification time gets reset indicating a completed
1720 update.</para>
1721
1722 <para>If the <varname>systemd.condition_needs_update=</varname> option is specified on the kernel
1723 command line (taking a boolean), it will override the result of this condition check, taking
1724 precedence over any file modification time checks. If the kernel command line option is used,
1725 <filename>systemd-update-done.service</filename> will not have immediate effect on any following
1726 <varname>ConditionNeedsUpdate=</varname> checks, until the system is rebooted where the kernel
1727 command line option is not specified anymore.</para>
1728
1729 <para>Note that to make this scheme effective, the timestamp of <filename>/usr/</filename> should
1730 be explicitly updated after its contents are modified. The kernel will automatically update
1731 modification timestamp on a directory only when immediate children of a directory are modified; an
1732 modification of nested files will not automatically result in mtime of <filename>/usr/</filename>
1733 being updated.</para>
1734
1735 <para>Also note that if the update method includes a call to execute appropriate post-update steps
1736 itself, it should not touch the timestamp of <filename>/usr/</filename>. In a typical distribution
1737 packaging scheme, packages will do any required update steps as part of the installation or
1738 upgrade, to make package contents immediately usable. <varname>ConditionNeedsUpdate=</varname>
1739 should be used with other update mechanisms where such an immediate update does not
1740 happen.</para>
1741
1742 <xi:include href="version-info.xml" xpointer="v244"/></listitem>
1743 </varlistentry>
1744
1745 <varlistentry>
1746 <term><varname>ConditionFirstBoot=</varname></term>
1747
1748 <listitem><para>Takes a boolean argument. This condition may be used to conditionalize units on
1749 whether the system is booting up for the first time. This roughly means that <filename>/etc/</filename>
1750 was unpopulated when the system started booting (for details, see "First Boot Semantics" in
1751 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
1752 First Boot is considered finished (this condition will evaluate as false) after the manager
1753 has finished the startup phase.</para>
1754
1755 <para>This condition may be used to populate <filename>/etc/</filename> on the first boot after
1756 factory reset, or when a new system instance boots up for the first time.</para>
1757
1758 <para>Note that the service manager itself will perform setup steps during First Boot: it will
1759 initialize
1760 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry> and
1761 preset all units, enabling or disabling them according to the
1762 <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1763 settings. Additional setup may be performed via units with
1764 <varname>ConditionFirstBoot=yes</varname>.</para>
1765
1766 <para>For robustness, units with <varname>ConditionFirstBoot=yes</varname> should order themselves
1767 before <filename>first-boot-complete.target</filename> and pull in this passive target with
1768 <varname>Wants=</varname>. This ensures that in a case of an aborted first boot, these units will
1769 be re-run during the next system startup.</para>
1770
1771 <para>If the <varname>systemd.condition_first_boot=</varname> option is specified on the kernel
1772 command line (taking a boolean), it will override the result of this condition check, taking
1773 precedence over <filename>/etc/machine-id</filename> existence checks.</para>
1774
1775 <xi:include href="version-info.xml" xpointer="v244"/>
1776 </listitem>
1777 </varlistentry>
1778
1779 <varlistentry>
1780 <term><varname>ConditionPathExists=</varname></term>
1781
1782 <listitem><para>Check for the existence of a file. If the specified absolute path name does not exist,
1783 the condition will fail. If the absolute path name passed to
1784 <varname>ConditionPathExists=</varname> is prefixed with an exclamation mark
1785 (<literal>!</literal>), the test is negated, and the unit is only started if the path does not
1786 exist.</para>
1787
1788 <xi:include href="version-info.xml" xpointer="v244"/>
1789 </listitem>
1790 </varlistentry>
1791
1792 <varlistentry>
1793 <term><varname>ConditionPathExistsGlob=</varname></term>
1794
1795 <listitem><para><varname>ConditionPathExistsGlob=</varname> is similar to
1796 <varname>ConditionPathExists=</varname>, but checks for the existence of at least one file or
1797 directory matching the specified globbing pattern.</para>
1798
1799 <xi:include href="version-info.xml" xpointer="v244"/>
1800 </listitem>
1801 </varlistentry>
1802
1803 <varlistentry>
1804 <term><varname>ConditionPathIsDirectory=</varname></term>
1805
1806 <listitem><para><varname>ConditionPathIsDirectory=</varname> is similar to
1807 <varname>ConditionPathExists=</varname> but verifies that a certain path exists and is a
1808 directory.</para>
1809
1810 <xi:include href="version-info.xml" xpointer="v244"/>
1811 </listitem>
1812 </varlistentry>
1813
1814 <varlistentry>
1815 <term><varname>ConditionPathIsSymbolicLink=</varname></term>
1816
1817 <listitem><para><varname>ConditionPathIsSymbolicLink=</varname> is similar to
1818 <varname>ConditionPathExists=</varname> but verifies that a certain path exists and is a symbolic
1819 link.</para>
1820
1821 <xi:include href="version-info.xml" xpointer="v244"/>
1822 </listitem>
1823 </varlistentry>
1824
1825 <varlistentry>
1826 <term><varname>ConditionPathIsMountPoint=</varname></term>
1827
1828 <listitem><para><varname>ConditionPathIsMountPoint=</varname> is similar to
1829 <varname>ConditionPathExists=</varname> but verifies that a certain path exists and is a mount
1830 point.</para>
1831
1832 <xi:include href="version-info.xml" xpointer="v244"/>
1833 </listitem>
1834 </varlistentry>
1835
1836 <varlistentry>
1837 <term><varname>ConditionPathIsReadWrite=</varname></term>
1838
1839 <listitem><para><varname>ConditionPathIsReadWrite=</varname> is similar to
1840 <varname>ConditionPathExists=</varname> but verifies that the underlying file system is readable
1841 and writable (i.e. not mounted read-only).</para>
1842
1843 <xi:include href="version-info.xml" xpointer="v244"/>
1844 </listitem>
1845 </varlistentry>
1846
1847 <varlistentry>
1848 <term><varname>ConditionPathIsEncrypted=</varname></term>
1849
1850 <listitem><para><varname>ConditionPathIsEncrypted=</varname> is similar to
1851 <varname>ConditionPathExists=</varname> but verifies that the underlying file system's backing
1852 block device is encrypted using dm-crypt/LUKS. Note that this check does not cover ext4
1853 per-directory encryption, and only detects block level encryption. Moreover, if the specified path
1854 resides on a file system on top of a loopback block device, only encryption above the loopback device is
1855 detected. It is not detected whether the file system backing the loopback block device is encrypted.</para>
1856
1857 <xi:include href="version-info.xml" xpointer="v246"/>
1858 </listitem>
1859 </varlistentry>
1860
1861 <varlistentry>
1862 <term><varname>ConditionPathIsSocket=</varname></term>
1863
1864 <listitem><para><varname>ConditionPathIsSocket=</varname> is similar to
1865 <varname>ConditionPathExists=</varname> but verifies that a certain path exists and is a
1866 socket.</para>
1867
1868 <xi:include href="version-info.xml" xpointer="v260"/>
1869 </listitem>
1870 </varlistentry>
1871
1872 <varlistentry>
1873 <term><varname>ConditionDirectoryNotEmpty=</varname></term>
1874
1875 <listitem><para><varname>ConditionDirectoryNotEmpty=</varname> is similar to
1876 <varname>ConditionPathExists=</varname> but verifies that a certain path exists and is a non-empty
1877 directory.</para>
1878
1879 <xi:include href="version-info.xml" xpointer="v244"/>
1880 </listitem>
1881 </varlistentry>
1882
1883 <varlistentry>
1884 <term><varname>ConditionFileNotEmpty=</varname></term>
1885
1886 <listitem><para><varname>ConditionFileNotEmpty=</varname> is similar to
1887 <varname>ConditionPathExists=</varname> but verifies that a certain path exists and refers to a
1888 regular file with a non-zero size.</para>
1889
1890 <xi:include href="version-info.xml" xpointer="v244"/>
1891 </listitem>
1892 </varlistentry>
1893
1894 <varlistentry>
1895 <term><varname>ConditionFileIsExecutable=</varname></term>
1896
1897 <listitem><para><varname>ConditionFileIsExecutable=</varname> is similar to
1898 <varname>ConditionPathExists=</varname> but verifies that a certain path exists, is a regular file,
1899 and marked executable.</para>
1900
1901 <xi:include href="version-info.xml" xpointer="v244"/>
1902 </listitem>
1903 </varlistentry>
1904
1905 <varlistentry>
1906 <term><varname>ConditionUser=</varname></term>
1907
1908 <listitem><para><varname>ConditionUser=</varname> takes a numeric <literal>UID</literal>, a UNIX
1909 user name, or the special value <literal>@system</literal>. This condition may be used to check
1910 whether the service manager is running as the given user. The special value
1911 <literal>@system</literal> can be used to check if the user id is within the system user
1912 range. This option is not useful for system services, as the system manager exclusively runs as the
1913 root user, and thus the test result is constant.</para>
1914
1915 <xi:include href="version-info.xml" xpointer="v244"/>
1916 </listitem>
1917 </varlistentry>
1918
1919 <varlistentry>
1920 <term><varname>ConditionGroup=</varname></term>
1921
1922 <listitem><para><varname>ConditionGroup=</varname> is similar to <varname>ConditionUser=</varname>
1923 but verifies that the service manager's real or effective group, or any of its auxiliary groups,
1924 match the specified group or GID. This setting does not support the special value
1925 <literal>@system</literal>.</para>
1926
1927 <xi:include href="version-info.xml" xpointer="v244"/>
1928 </listitem>
1929 </varlistentry>
1930
1931 <varlistentry>
1932 <term><varname>ConditionControlGroupController=</varname></term>
1933
1934 <listitem><para>Check whether given cgroup controllers (e.g. <literal>cpu</literal>) are available
1935 for use on the system or whether the legacy v1 cgroup or the modern v2 cgroup hierarchy is used.
1936 </para>
1937
1938 <para>Multiple controllers may be passed with a space separating them; in this case, the condition
1939 will only pass if all listed controllers are available for use. Controllers unknown to systemd are
1940 ignored. Valid controllers are <literal>cpu</literal>, <literal>io</literal>,
1941 <literal>memory</literal>, and <literal>pids</literal>. Even if available in the kernel, a
1942 particular controller may not be available if it was disabled on the kernel command line with
1943 <varname>cgroup_disable=controller</varname>.</para>
1944
1945 <para>Alternatively, two special strings <literal>v1</literal> and <literal>v2</literal> may be
1946 specified (without any controller names). <literal>v2</literal> will pass if the unified v2 cgroup
1947 hierarchy is used, and <literal>v1</literal> will pass if the legacy v1 hierarchy or the hybrid
1948 hierarchy are used. Note that legacy or hybrid hierarchies have been deprecated. See
1949 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> for
1950 more information.</para>
1951
1952 <xi:include href="version-info.xml" xpointer="v244"/>
1953 </listitem>
1954 </varlistentry>
1955
1956 <varlistentry>
1957 <term><varname>ConditionMemory=</varname></term>
1958
1959 <listitem><para>Verify that the specified amount of system memory is available to the current
1960 system. Takes a memory size in bytes as argument, optionally prefixed with a comparison operator
1961 <literal>&lt;</literal>, <literal>&lt;=</literal>, <literal>=</literal> (or <literal>==</literal>),
1962 <literal>!=</literal> (or <literal>&lt;&gt;</literal>), <literal>&gt;=</literal>,
1963 <literal>&gt;</literal>. On bare-metal systems compares the amount of physical memory in the system
1964 with the specified size, adhering to the specified comparison operator. In containers compares the
1965 amount of memory assigned to the container instead.</para>
1966
1967 <xi:include href="version-info.xml" xpointer="v244"/>
1968 </listitem>
1969 </varlistentry>
1970
1971 <varlistentry>
1972 <term><varname>ConditionCPUs=</varname></term>
1973
1974 <listitem><para>Verify that the specified number of CPUs is available to the current system. Takes
1975 a number of CPUs as argument, optionally prefixed with a comparison operator
1976 <literal>&lt;</literal>, <literal>&lt;=</literal>, <literal>=</literal> (or <literal>==</literal>),
1977 <literal>!=</literal> (or <literal>&lt;&gt;</literal>), <literal>&gt;=</literal>,
1978 <literal>&gt;</literal>. Compares the number of CPUs in the CPU affinity mask configured of the
1979 service manager itself with the specified number, adhering to the specified comparison operator. On
1980 physical systems the number of CPUs in the affinity mask of the service manager usually matches the
1981 number of physical CPUs, but in special and virtual environments might differ. In particular, in
1982 containers the affinity mask usually matches the number of CPUs assigned to the container and not
1983 the physically available ones.</para>
1984
1985 <xi:include href="version-info.xml" xpointer="v244"/></listitem>
1986 </varlistentry>
1987
1988 <varlistentry>
1989 <term><varname>ConditionCPUFeature=</varname></term>
1990
1991 <listitem><para>Verify that a given CPU feature is available via the <literal>CPUID</literal>
1992 instruction. This condition only does something on i386 and x86-64 processors. On other
1993 processors it is assumed that the CPU does not support the given feature. It checks the leaves
1994 <literal>1</literal>, <literal>7</literal>, <literal>0x80000001</literal>, and
1995 <literal>0x80000007</literal>. Valid values are:
1996 <literal>fpu</literal>,
1997 <literal>vme</literal>,
1998 <literal>de</literal>,
1999 <literal>pse</literal>,
2000 <literal>tsc</literal>,
2001 <literal>msr</literal>,
2002 <literal>pae</literal>,
2003 <literal>mce</literal>,
2004 <literal>cx8</literal>,
2005 <literal>apic</literal>,
2006 <literal>sep</literal>,
2007 <literal>mtrr</literal>,
2008 <literal>pge</literal>,
2009 <literal>mca</literal>,
2010 <literal>cmov</literal>,
2011 <literal>pat</literal>,
2012 <literal>pse36</literal>,
2013 <literal>clflush</literal>,
2014 <literal>mmx</literal>,
2015 <literal>fxsr</literal>,
2016 <literal>sse</literal>,
2017 <literal>sse2</literal>,
2018 <literal>ht</literal>,
2019 <literal>pni</literal>,
2020 <literal>pclmul</literal>,
2021 <literal>monitor</literal>,
2022 <literal>ssse3</literal>,
2023 <literal>fma3</literal>,
2024 <literal>cx16</literal>,
2025 <literal>sse4_1</literal>,
2026 <literal>sse4_2</literal>,
2027 <literal>movbe</literal>,
2028 <literal>popcnt</literal>,
2029 <literal>aes</literal>,
2030 <literal>xsave</literal>,
2031 <literal>osxsave</literal>,
2032 <literal>avx</literal>,
2033 <literal>f16c</literal>,
2034 <literal>rdrand</literal>,
2035 <literal>bmi1</literal>,
2036 <literal>avx2</literal>,
2037 <literal>bmi2</literal>,
2038 <literal>rdseed</literal>,
2039 <literal>adx</literal>,
2040 <literal>sha_ni</literal>,
2041 <literal>syscall</literal>,
2042 <literal>rdtscp</literal>,
2043 <literal>lm</literal>,
2044 <literal>lahf_lm</literal>,
2045 <literal>abm</literal>,
2046 <literal>constant_tsc</literal>.</para>
2047
2048 <xi:include href="version-info.xml" xpointer="v248"/>
2049 </listitem>
2050 </varlistentry>
2051
2052 <varlistentry>
2053 <term><varname>ConditionOSRelease=</varname></term>
2054
2055 <listitem><para>Verify that a specific <literal>key=value</literal> pair is set in the host's
2056 <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
2057
2058 <para>Other than exact string matching (with <literal>=</literal> and <literal>!=</literal>),
2059 relative comparisons are supported for versioned parameters (e.g. <literal>VERSION_ID</literal>;
2060 with <literal>&lt;</literal>, <literal>&lt;=</literal>, <literal>==</literal>,
2061 <literal>&lt;&gt;</literal>, <literal>&gt;=</literal>, <literal>&gt;</literal>), and shell-style
2062 wildcard comparisons (<literal>*</literal>, <literal>?</literal>, <literal>[]</literal>) are
2063 supported with the <literal>$=</literal> (match) and <literal>!$=</literal> (non-match).</para>
2064
2065 <para>If the given key is not found in the file, the match is done against an empty value.</para>
2066
2067 <xi:include href="version-info.xml" xpointer="v249"/>
2068 </listitem>
2069 </varlistentry>
2070
2071 <varlistentry>
2072 <term><varname>ConditionMachineTag=</varname></term>
2073
2074 <listitem><para><varname>ConditionMachineTag=</varname> may be used to match against the tags
2075 assigned to the local machine. Machine tags are short labels that classify and group machines for
2076 management purposes; they are configured in the <varname>TAGS=</varname> field of
2077 <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry> and
2078 may be queried and changed with the <command>tags</command> command of
2079 <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>. The
2080 argument is a single tag pattern, which is compared against each of the configured tags using
2081 shell-style globbing (<literal>*</literal>, <literal>?</literal>, <literal>[]</literal>). The
2082 condition is satisfied if at least one of the configured tags matches the pattern. The test may be
2083 negated by prepending an exclamation mark, in which case it is satisfied if none of the configured
2084 tags matches.</para>
2085
2086 <xi:include href="version-info.xml" xpointer="v261"/>
2087 </listitem>
2088 </varlistentry>
2089
2090 <varlistentry>
2091 <term><varname>ConditionMemoryPressure=</varname></term>
2092 <term><varname>ConditionCPUPressure=</varname></term>
2093 <term><varname>ConditionIOPressure=</varname></term>
2094
2095 <listitem><para>Verify that the overall system (memory, CPU or IO) pressure is below or equal to a threshold.
2096 This setting takes a threshold value as argument. It can be specified as a simple percentage value,
2097 suffixed with <literal>%</literal>, in which case the pressure will be measured as an average over the last
2098 five minutes before the attempt to start the unit is performed.
2099 Alternatively, the average timespan can also be specified using <literal>/</literal> as a separator, for
2100 example: <literal>10%/1min</literal>. The supported timespans match what the kernel provides, and are
2101 limited to <literal>10sec</literal>, <literal>1min</literal> and <literal>5min</literal>. The
2102 <literal>full</literal> PSI will be checked first, and if not found <literal>some</literal> will be
2103 checked. For more details, see the documentation on <ulink
2104 url="https://docs.kernel.org/accounting/psi.html">PSI (Pressure Stall Information)
2105 </ulink>.</para>
2106
2107 <para>Optionally, the threshold value can be prefixed with the slice unit under which the pressure will be checked,
2108 followed by a <literal>:</literal>. If the slice unit is not specified, the overall system pressure will be measured,
2109 instead of a particular cgroup's.</para>
2110
2111 <xi:include href="version-info.xml" xpointer="v250"/>
2112 </listitem>
2113 </varlistentry>
2114
2115 <varlistentry>
2116 <term><varname>ConditionKernelModuleLoaded=</varname></term>
2117
2118 <listitem><para>Test whether the specified kernel module has been loaded and is already fully
2119 initialized.</para>
2120
2121 <xi:include href="version-info.xml" xpointer="v258"/>
2122 </listitem>
2123 </varlistentry>
2124
2125 <varlistentry>
2126 <term><varname>AssertArchitecture=</varname></term>
2127 <term><varname>AssertVirtualization=</varname></term>
2128 <term><varname>AssertHost=</varname></term>
2129 <term><varname>AssertFraction=</varname></term>
2130 <term><varname>AssertKernelCommandLine=</varname></term>
2131 <term><varname>AssertKernelVersion=</varname></term>
2132 <term><varname>AssertVersion=</varname></term>
2133 <term><varname>AssertCredential=</varname></term>
2134 <term><varname>AssertEnvironment=</varname></term>
2135 <term><varname>AssertSecurity=</varname></term>
2136 <term><varname>AssertCapability=</varname></term>
2137 <term><varname>AssertACPower=</varname></term>
2138 <term><varname>AssertNeedsUpdate=</varname></term>
2139 <term><varname>AssertFirstBoot=</varname></term>
2140 <term><varname>AssertPathExists=</varname></term>
2141 <term><varname>AssertPathExistsGlob=</varname></term>
2142 <term><varname>AssertPathIsDirectory=</varname></term>
2143 <term><varname>AssertPathIsSymbolicLink=</varname></term>
2144 <term><varname>AssertPathIsMountPoint=</varname></term>
2145 <term><varname>AssertPathIsReadWrite=</varname></term>
2146 <term><varname>AssertPathIsEncrypted=</varname></term>
2147 <term><varname>AssertPathIsSocket=</varname></term>
2148 <term><varname>AssertDirectoryNotEmpty=</varname></term>
2149 <term><varname>AssertFileNotEmpty=</varname></term>
2150 <term><varname>AssertFileIsExecutable=</varname></term>
2151 <term><varname>AssertUser=</varname></term>
2152 <term><varname>AssertGroup=</varname></term>
2153 <term><varname>AssertControlGroupController=</varname></term>
2154 <term><varname>AssertMemory=</varname></term>
2155 <term><varname>AssertCPUs=</varname></term>
2156 <term><varname>AssertCPUFeature=</varname></term>
2157 <term><varname>AssertOSRelease=</varname></term>
2158 <term><varname>AssertMachineTag=</varname></term>
2159 <term><varname>AssertMemoryPressure=</varname></term>
2160 <term><varname>AssertCPUPressure=</varname></term>
2161 <term><varname>AssertIOPressure=</varname></term>
2162 <term><varname>AssertKernelModuleLoaded=</varname></term>
2163
2164 <listitem><para>Similar to the <varname>ConditionArchitecture=</varname>,
2165 <varname>ConditionVirtualization=</varname>, …, condition settings described above, these settings
2166 add assertion checks to the start-up of the unit. However, unlike the conditions settings, any
2167 assertion setting that is not met results in failure of the start job (which means this is logged
2168 loudly). Note that hitting a configured assertion does not cause the unit to enter the
2169 <literal>failed</literal> state (or in fact result in any state change of the unit), it affects
2170 only the job queued for it. Use assertion expressions for units that cannot operate when specific
2171 requirements are not met, and when this is something the administrator or user should look
2172 into.</para>
2173
2174 <xi:include href="version-info.xml" xpointer="v218"/>
2175 </listitem>
2176 </varlistentry>
2177 </variablelist>
2178 </refsect2>
2179 </refsect1>
2180
2181 <refsect1>
2182 <title>Mapping of unit properties to their inverses</title>
2183
2184 <para>Unit settings that create a relationship with a second unit usually show up
2185 in properties of both units, for example in <command>systemctl show</command>
2186 output. In some cases the name of the property is the same as the name of the
2187 configuration setting, but not always. This table lists the properties
2188 that are shown on two units which are connected through some dependency, and shows
2189 which property on "source" unit corresponds to which property on the "target" unit.
2190 </para>
2191
2192 <table>
2193 <title>
2194 "Forward" and "reverse" unit properties
2195 </title>
2196
2197 <tgroup cols='4'>
2198 <colspec colname='forward' />
2199 <colspec colname='reverse' />
2200 <colspec colname='fuse' />
2201 <colspec colname='ruse' />
2202 <thead>
2203 <row>
2204 <entry>"Forward" property</entry>
2205 <entry>"Reverse" property</entry>
2206 <entry namest='fuse' nameend='ruse' valign='middle'>Where used</entry>
2207 </row>
2208 </thead>
2209 <tbody>
2210 <row>
2211 <entry><varname>Before=</varname></entry>
2212 <entry><varname>After=</varname></entry>
2213 <entry morerows='1' namest='fuse' nameend='ruse' valign='middle'>[Unit] section</entry>
2214 </row>
2215 <row>
2216 <entry><varname>After=</varname></entry>
2217 <entry><varname>Before=</varname></entry>
2218 </row>
2219 <row>
2220 <entry><varname>Requires=</varname></entry>
2221 <entry><varname>RequiredBy=</varname></entry>
2222 <entry>[Unit] section</entry>
2223 <entry>[Install] section</entry>
2224 </row>
2225 <row>
2226 <entry><varname>Wants=</varname></entry>
2227 <entry><varname>WantedBy=</varname></entry>
2228 <entry>[Unit] section</entry>
2229 <entry>[Install] section</entry>
2230 </row>
2231 <row>
2232 <entry><varname>Upholds=</varname></entry>
2233 <entry><varname>UpheldBy=</varname></entry>
2234 <entry>[Unit] section</entry>
2235 <entry>[Install] section</entry>
2236 </row>
2237 <row>
2238 <entry><varname>PartOf=</varname></entry>
2239 <entry><varname>ConsistsOf=</varname></entry>
2240 <entry>[Unit] section</entry>
2241 <entry>an automatic property</entry>
2242 </row>
2243 <row>
2244 <entry><varname>BindsTo=</varname></entry>
2245 <entry><varname>BoundBy=</varname></entry>
2246 <entry>[Unit] section</entry>
2247 <entry>an automatic property</entry>
2248 </row>
2249 <row>
2250 <entry><varname>Requisite=</varname></entry>
2251 <entry><varname>RequisiteOf=</varname></entry>
2252 <entry>[Unit] section</entry>
2253 <entry>an automatic property</entry>
2254 </row>
2255 <row>
2256 <entry><varname>Conflicts=</varname></entry>
2257 <entry><varname>ConflictedBy=</varname></entry>
2258 <entry>[Unit] section</entry>
2259 <entry>an automatic property</entry>
2260 </row>
2261 <row>
2262 <entry><varname>Triggers=</varname></entry>
2263 <entry><varname>TriggeredBy=</varname></entry>
2264 <entry namest='fuse' nameend='ruse' valign='middle'>Automatic properties, see notes below</entry>
2265 </row>
2266 <row>
2267 <entry><varname>PropagatesReloadTo=</varname></entry>
2268 <entry><varname>ReloadPropagatedFrom=</varname></entry>
2269 <entry morerows='1' namest='fuse' nameend='ruse' valign='middle'>[Unit] section</entry>
2270 </row>
2271 <row>
2272 <entry><varname>ReloadPropagatedFrom=</varname></entry>
2273 <entry><varname>PropagatesReloadTo=</varname></entry>
2274 </row>
2275 <row>
2276 <entry><varname>PropagatesStopTo=</varname></entry>
2277 <entry><varname>StopPropagatedFrom=</varname></entry>
2278 <entry morerows='1' namest='fuse' nameend='ruse' valign='middle'>[Unit] section</entry>
2279 </row>
2280 <row>
2281 <entry><varname>StopPropagatedFrom=</varname></entry>
2282 <entry><varname>PropagatesStopTo=</varname></entry>
2283 </row>
2284 <row>
2285 <entry><varname>Following=</varname></entry>
2286 <entry>n/a</entry>
2287 <entry>An automatic property</entry>
2288 </row>
2289 </tbody>
2290 </tgroup>
2291 </table>
2292
2293 <para>Note: <varname>WantedBy=</varname>, <varname>RequiredBy=</varname>, and <varname>UpheldBy=</varname>
2294 are used in the [Install] section to create symlinks in <filename>.wants/</filename>,
2295 <filename>.requires/</filename>, and <filename>.upholds/</filename> directories. They cannot be used
2296 directly as a unit configuration setting.</para>
2297
2298 <para>Note: <varname>ConsistsOf=</varname>, <varname>BoundBy=</varname>,
2299 <varname>RequisiteOf=</varname>, <varname>ConflictedBy=</varname> are created
2300 implicitly along with their reverses and cannot be specified directly.</para>
2301
2302 <para>Note: <varname>Triggers=</varname> is created implicitly between a socket,
2303 path unit, or an automount unit, and the unit they activate. By default, a unit
2304 with the same name is triggered, but this can be overridden using
2305 <varname>Sockets=</varname>, <varname>Service=</varname>, and <varname>Unit=</varname>
2306 settings. See
2307 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
2308 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
2309 <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
2310 and
2311 <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
2312 for details. <varname>TriggeredBy=</varname> is created implicitly on the
2313 triggered unit.</para>
2314
2315 <para>Note: <varname>Following=</varname> is used to group device aliases and points to the
2316 "primary" device unit that systemd is using to track device state, usually corresponding to a
2317 sysfs path. It does not show up in the "target" unit.</para>
2318 </refsect1>
2319
2320 <refsect1>
2321 <title>[Install] Section Options</title>
2322
2323 <para>Unit files may include an [Install] section, which carries installation information for
2324 the unit. This section is not interpreted by
2325 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> during runtime; it is
2326 used by the <command>enable</command> and <command>disable</command> commands of the
2327 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> tool during
2328 installation of a unit.</para>
2329
2330 <variablelist class='unit-directives'>
2331 <varlistentry>
2332 <term><varname>Alias=</varname></term>
2333
2334 <listitem><para>A space-separated list of additional names this unit shall be installed under. The names listed
2335 here must have the same suffix (i.e. type) as the unit filename. This option may be specified more than once,
2336 in which case all listed names are used. At installation time, <command>systemctl enable</command> will create
2337 symlinks from these names to the unit filename. Note that not all unit types support such alias names, and this
2338 setting is not supported for them. Specifically, mount, slice, swap, and automount units do not support
2339 aliasing.</para>
2340
2341 <xi:include href="version-info.xml" xpointer="v201"/></listitem>
2342 </varlistentry>
2343
2344 <varlistentry>
2345 <term><varname>WantedBy=</varname></term>
2346 <term><varname>RequiredBy=</varname></term>
2347 <term><varname>UpheldBy=</varname></term>
2348
2349 <listitem><para>This option may be used more than once, or a space-separated list of unit names may
2350 be given. A symbolic link is created in the <filename>.wants/</filename>, <filename>.requires/</filename>,
2351 or <filename>.upholds/</filename> directory of each of the listed units when this unit is installed
2352 by <command>systemctl enable</command>. This has the effect of a dependency of type
2353 <varname>Wants=</varname>, <varname>Requires=</varname>, or <varname>Upholds=</varname> being added
2354 from the listed unit to the current unit. See the description of the mentioned dependency types
2355 in the [Unit] section for details.</para>
2356
2357 <para>In case of template units listing non template units, the listing unit must have
2358 <varname>DefaultInstance=</varname> set, or <command>systemctl enable</command> must be called with
2359 an instance name. The instance (default or specified) will be added to the
2360 <filename>.wants/</filename>, <filename>.requires/</filename>, or <filename>.upholds/</filename>
2361 list of the listed unit. For example, <command>WantedBy=getty.target</command> in a service
2362 <filename>[email protected]</filename> will result in <command>systemctl enable [email protected]</command>
2363 creating a <filename>getty.target.wants/[email protected]</filename> link to
2364 <filename>[email protected]</filename>. This also applies to listing specific instances of templated
2365 units: this specific instance will gain the dependency. A template unit may also list a template
2366 unit, in which case a generic dependency will be added where each instance of the listing unit will
2367 have a dependency on an instance of the listed template with the same instance value. For example,
2368 <command>[email protected]</command> in a service <filename>[email protected]</filename> will
2369 result in <command>systemctl enable [email protected]</command> creating a
2370 <filename>[email protected]/[email protected]</filename> link to
2371 <filename>[email protected]</filename>, which applies to all instances of
2372 <filename>[email protected]</filename>.</para>
2373
2374 <xi:include href="version-info.xml" xpointer="v201"/></listitem>
2375 </varlistentry>
2376
2377 <varlistentry>
2378 <term><varname>Also=</varname></term>
2379
2380 <listitem><para>Additional units to install/deinstall when
2381 this unit is installed/deinstalled. If the user requests
2382 installation/deinstallation of a unit with this option
2383 configured, <command>systemctl enable</command> and
2384 <command>systemctl disable</command> will automatically
2385 install/uninstall units listed in this option as well.</para>
2386
2387 <para>This option may be used more than once, or a
2388 space-separated list of unit names may be
2389 given.</para>
2390
2391 <xi:include href="version-info.xml" xpointer="v201"/></listitem>
2392 </varlistentry>
2393
2394 <varlistentry>
2395 <term><varname>DefaultInstance=</varname></term>
2396
2397 <listitem><para>In template unit files, this specifies for
2398 which instance the unit shall be enabled if the template is
2399 enabled without any explicitly set instance. This option has
2400 no effect in non-template unit files. The specified string
2401 must be usable as instance identifier.</para>
2402
2403 <xi:include href="version-info.xml" xpointer="v215"/></listitem>
2404 </varlistentry>
2405 </variablelist>
2406
2407 <para>The following specifiers are interpreted in the Install section:
2408 %a, %b, %B, %g, %G, %H, %i, %j, %l, %m, %n, %N, %o, %p, %u, %U, %v, %w, %W, %%.
2409 For their meaning see the next section.</para>
2410 </refsect1>
2411
2412 <refsect1>
2413 <title>Specifiers</title>
2414
2415 <para>Many settings resolve specifiers which may be used to write
2416 generic unit files referring to runtime or unit parameters that
2417 are replaced when the unit files are loaded. Specifiers must be known
2418 and resolvable for the setting to be valid. The following
2419 specifiers are understood:</para>
2420
2421 <table class='specifiers'>
2422 <title>Specifiers available in unit files</title>
2423 <tgroup cols='3' align='left' colsep='1' rowsep='1'>
2424 <colspec colname="spec" />
2425 <colspec colname="mean" />
2426 <colspec colname="detail" />
2427 <thead>
2428 <row>
2429 <entry>Specifier</entry>
2430 <entry>Meaning</entry>
2431 <entry>Details</entry>
2432 </row>
2433 </thead>
2434 <tbody>
2435 <row>
2436 <!-- We do not use the common definition from standard-specifiers.xml here since it includes a
2437 reference onto our own man page, which would make the rendered version self-referential. -->
2438 <entry><literal>%a</literal></entry>
2439 <entry>Architecture</entry>
2440 <entry>A short string identifying the architecture of the local system. A string such as <constant>x86</constant>, <constant>x86-64</constant> or <constant>arm64</constant>. See the architectures defined for <varname>ConditionArchitecture=</varname> above for a full list.</entry>
2441 </row>
2442 <xi:include href="standard-specifiers.xml" xpointer="A"/>
2443 <xi:include href="standard-specifiers.xml" xpointer="b"/>
2444 <xi:include href="standard-specifiers.xml" xpointer="B"/>
2445 <row>
2446 <entry><literal>%C</literal></entry>
2447 <entry>Cache directory root</entry>
2448 <entry>This is either <filename>/var/cache</filename> (for the system manager) or the path <literal>$XDG_CACHE_HOME</literal> resolves to (for user managers).</entry>
2449 </row>
2450 <row>
2451 <entry><literal>%d</literal></entry>
2452 <entry>Credentials directory</entry>
2453 <entry>This is the value of the <literal>$CREDENTIALS_DIRECTORY</literal> environment variable if available. See section "Credentials" in <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more information.</entry>
2454 </row>
2455 <row>
2456 <entry><literal>%D</literal></entry>
2457 <entry>Shared data directory</entry>
2458 <entry>This is either <filename>/usr/share/</filename> (for the system manager) or the path <literal>$XDG_DATA_HOME</literal> resolves to (for user managers).</entry>
2459 </row>
2460 <row>
2461 <entry><literal>%E</literal></entry>
2462 <entry>Configuration directory root</entry>
2463 <entry>This is either <filename>/etc/</filename> (for the system manager) or the path <literal>$XDG_CONFIG_HOME</literal> resolves to (for user managers).</entry>
2464 </row>
2465 <row>
2466 <entry><literal>%f</literal></entry>
2467 <entry>Unescaped filename</entry>
2468 <entry>This is either the unescaped instance name (if applicable) with <filename>/</filename> prepended (if applicable), or the unescaped prefix name prepended with <filename>/</filename>. This implements unescaping according to the rules for escaping absolute file system paths discussed above.</entry>
2469 </row>
2470 <row>
2471 <entry><literal>%g</literal></entry>
2472 <entry>User group</entry>
2473 <entry>This is the name of the group running the service manager instance. In case of the system manager this resolves to <literal>root</literal>.</entry>
2474 </row>
2475 <row>
2476 <entry><literal>%G</literal></entry>
2477 <entry>User GID</entry>
2478 <entry>This is the numeric GID of the user running the service manager instance. In case of the system manager this resolves to <literal>0</literal>.</entry>
2479 </row>
2480 <row>
2481 <entry><literal>%h</literal></entry>
2482 <entry>User home directory</entry>
2483 <entry>This is the home directory of the <emphasis>user running the service manager instance</emphasis>. In case of the system manager this resolves to <literal>/root</literal>.
2484
2485 Note that this setting is <emphasis>not</emphasis> influenced by the <varname>User=</varname> setting configurable in the [Service] section of the service unit.</entry>
2486 </row>
2487 <row>
2488 <!-- We do not use the common definition from standard-specifiers.xml here since we want a
2489 slightly more verbose explanation here, referring to the reload cycle. -->
2490 <entry><literal>%H</literal></entry>
2491 <entry>Host name</entry>
2492 <entry>The hostname of the running system at the point in time the unit configuration is loaded.</entry>
2493 </row>
2494 <row>
2495 <entry><literal>%i</literal></entry>
2496 <entry>Instance name</entry>
2497 <entry>For instantiated units this is the string between the first <literal>@</literal> character and the type suffix. Empty for non-instantiated units.</entry>
2498 </row>
2499 <row>
2500 <entry><literal>%I</literal></entry>
2501 <entry>Unescaped instance name</entry>
2502 <entry>Same as <literal>%i</literal>, but with escaping undone.</entry>
2503 </row>
2504 <row>
2505 <entry><literal>%j</literal></entry>
2506 <entry>Final component of the prefix</entry>
2507 <entry>This is the string between the last <literal>-</literal> and the end of the prefix name. If there is no <literal>-</literal>, this is the same as <literal>%p</literal>.</entry>
2508 </row>
2509 <row>
2510 <entry><literal>%J</literal></entry>
2511 <entry>Unescaped final component of the prefix</entry>
2512 <entry>Same as <literal>%j</literal>, but with escaping undone.</entry>
2513 </row>
2514 <row>
2515 <entry><literal>%l</literal></entry>
2516 <!-- We do not use the common definition from standard-specifiers.xml here since we want a
2517 slightly more verbose explanation here, referring to the reload cycle. -->
2518 <entry>Short host name</entry>
2519 <entry>The hostname of the running system at the point in time the unit configuration is loaded, truncated at the first dot to remove any domain component.</entry>
2520 </row>
2521 <row>
2522 <entry><literal>%L</literal></entry>
2523 <entry>Log directory root</entry>
2524 <entry>This is either <filename>/var/log</filename> (for the system manager) or the path <varname>$XDG_STATE_HOME</varname> resolves to with <filename index="false">/log</filename> appended (for user managers).</entry>
2525 </row>
2526 <xi:include href="standard-specifiers.xml" xpointer="m"/>
2527 <xi:include href="standard-specifiers.xml" xpointer="M"/>
2528 <row>
2529 <entry><literal>%n</literal></entry>
2530 <entry>Full unit name</entry>
2531 <entry></entry>
2532 </row>
2533 <row>
2534 <entry><literal>%N</literal></entry>
2535 <entry>Full unit name</entry>
2536 <entry>Same as <literal>%n</literal>, but with the type suffix removed.</entry>
2537 </row>
2538 <xi:include href="standard-specifiers.xml" xpointer="o"/>
2539 <row>
2540 <entry><literal>%p</literal></entry>
2541 <entry>Prefix name</entry>
2542 <entry>For instantiated units, this refers to the string before the first <literal>@</literal> character of the unit name. For non-instantiated units, same as <literal>%N</literal>.</entry>
2543 </row>
2544 <row>
2545 <entry><literal>%P</literal></entry>
2546 <entry>Unescaped prefix name</entry>
2547 <entry>Same as <literal>%p</literal>, but with escaping undone.</entry>
2548 </row>
2549 <row>
2550 <!-- We do not use the common definition from standard-specifiers.xml here since we want a
2551 slightly more verbose explanation here, referring to the reload cycle. -->
2552 <entry><literal>%q</literal></entry>
2553 <entry>Pretty host name</entry>
2554 <entry>The pretty hostname of the running system at the point in time the unit configuration is loaded, as read from the <varname>PRETTY_HOSTNAME=</varname> field of <filename>/etc/machine-info</filename>. If not set, resolves to the short hostname. See <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more information.</entry>
2555 </row>
2556 <row>
2557 <entry><literal>%s</literal></entry>
2558 <entry>User shell</entry>
2559 <entry>This is the shell of the user running the service manager instance.</entry>
2560 </row>
2561 <row>
2562 <entry><literal>%S</literal></entry>
2563 <entry>State directory root</entry>
2564 <entry>This is either <filename>/var/lib</filename> (for the system manager) or the path <varname>$XDG_STATE_HOME</varname> resolves to (for user managers).</entry>
2565 </row>
2566 <row>
2567 <entry><literal>%t</literal></entry>
2568 <entry>Runtime directory root</entry>
2569 <entry>This is either <filename>/run/</filename> (for the system manager) or the path <literal>$XDG_RUNTIME_DIR</literal> resolves to (for user managers).</entry>
2570 </row>
2571 <xi:include href="standard-specifiers.xml" xpointer="T"/>
2572 <row>
2573 <entry><literal>%u</literal></entry>
2574 <entry>User name</entry>
2575 <entry>This is the name of the <emphasis>user running the service manager instance</emphasis>. In case of the system manager this resolves to <literal>root</literal>.
2576
2577 Note that this setting is <emphasis>not</emphasis> influenced by the <varname>User=</varname> setting configurable in the [Service] section of the service unit.</entry>
2578 </row>
2579 <row>
2580 <entry><literal>%U</literal></entry>
2581 <entry>User UID</entry>
2582 <entry>This is the numeric UID of the <emphasis>user running the service manager instance</emphasis>. In case of the system manager this resolves to <literal>0</literal>.
2583
2584 Note that this setting is <emphasis>not</emphasis> influenced by the <varname>User=</varname> setting configurable in the [Service] section of the service unit.</entry>
2585 </row>
2586 <xi:include href="standard-specifiers.xml" xpointer="v"/>
2587 <xi:include href="standard-specifiers.xml" xpointer="V"/>
2588 <xi:include href="standard-specifiers.xml" xpointer="w"/>
2589 <xi:include href="standard-specifiers.xml" xpointer="W"/>
2590 <row>
2591 <entry><literal>%y</literal></entry>
2592 <entry>The path to the fragment</entry>
2593 <entry>This is the path where the main part of the unit file is located. For linked unit files, the real path outside of the unit search directories is used. For units that do not have a fragment file, this specifier will raise an error.</entry>
2594 </row>
2595 <row>
2596 <entry><literal>%Y</literal></entry>
2597 <entry>The directory of the fragment</entry>
2598 <entry>This is the directory part of <literal>%y</literal>.</entry>
2599 </row>
2600 <xi:include href="standard-specifiers.xml" xpointer="percent"/>
2601 </tbody>
2602 </tgroup>
2603 </table>
2604 </refsect1>
2605
2606 <refsect1>
2607 <title>Examples</title>
2608
2609 <example>
2610 <title>Allowing units to be enabled</title>
2611
2612 <para>The following snippet (highlighted) allows a unit (e.g.
2613 <filename>foo.service</filename>) to be enabled via
2614 <command>systemctl enable</command>:</para>
2615
2616 <programlisting>[Unit]
2617 Description=Foo
2618
2619 [Service]
2620 ExecStart=/usr/sbin/foo-daemon
2621
2622 <emphasis>[Install]</emphasis>
2623 <emphasis>WantedBy=multi-user.target</emphasis></programlisting>
2624
2625 <para>After running <command>systemctl enable</command>, a
2626 symlink
2627 <filename index="false">/etc/systemd/system/multi-user.target.wants/foo.service</filename>
2628 linking to the actual unit will be created. It tells systemd to
2629 pull in the unit when starting
2630 <filename>multi-user.target</filename>. The inverse
2631 <command>systemctl disable</command> will remove that symlink
2632 again.</para>
2633 </example>
2634
2635 <example>
2636 <title>Overriding vendor settings</title>
2637
2638 <para>There are two methods of overriding vendor settings in
2639 unit files: copying the unit file from
2640 <filename>/usr/lib/systemd/system</filename> to
2641 <filename>/etc/systemd/system</filename> and modifying the
2642 chosen settings. Alternatively, one can create a directory named
2643 <filename><replaceable>unit</replaceable>.d/</filename> within
2644 <filename>/etc/systemd/system</filename> and place a drop-in
2645 file <filename><replaceable>name</replaceable>.conf</filename>
2646 there that only changes the specific settings one is interested
2647 in. Note that multiple such drop-in files are read if
2648 present, processed in lexicographic order of their filename.</para>
2649
2650 <para>The advantage of the first method is that one easily
2651 overrides the complete unit, the vendor unit is not parsed at
2652 all anymore. It has the disadvantage that improvements to the
2653 unit file by the vendor are not automatically incorporated on
2654 updates.</para>
2655
2656 <para>The advantage of the second method is that one only
2657 overrides the settings one specifically wants, where updates to
2658 the unit by the vendor automatically apply. This has the
2659 disadvantage that some future updates by the vendor might be
2660 incompatible with the local changes.</para>
2661
2662 <para>This also applies for user instances of systemd, but with
2663 different locations for the unit files. See the section on unit
2664 load paths for further details.</para>
2665
2666 <para>Suppose there is a vendor-supplied unit
2667 <filename>/usr/lib/systemd/system/httpd.service</filename> with
2668 the following contents:</para>
2669
2670 <programlisting>[Unit]
2671 Description=Some HTTP Server
2672 After=remote-fs.target sqldb.service
2673 Requires=sqldb.service
2674 AssertPathExists=/srv/webserver
2675
2676 [Service]
2677 Type=notify
2678 ExecStart=/usr/sbin/some-fancy-httpd-server
2679 Nice=5
2680
2681 [Install]
2682 WantedBy=multi-user.target</programlisting>
2683
2684 <para>Now one wants to change some settings as an administrator:
2685 firstly, in the local setup, <filename>/srv/webserver</filename>
2686 might not exist, because the HTTP server is configured to use
2687 <filename>/srv/www</filename> instead. Secondly, the local
2688 configuration makes the HTTP server also depend on a memory
2689 cache service, <filename>memcached.service</filename>, that
2690 should be pulled in (<varname>Requires=</varname>) and also be
2691 ordered appropriately (<varname>After=</varname>). Thirdly, in
2692 order to harden the service a bit more, the administrator would
2693 like to set the <varname>PrivateTmp=</varname> setting (see
2694 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
2695 for details). And lastly, the administrator would like to reset
2696 the niceness of the service to its default value of 0.</para>
2697
2698 <para>The first possibility is to copy the unit file to
2699 <filename>/etc/systemd/system/httpd.service</filename> and
2700 change the chosen settings:</para>
2701
2702 <programlisting>[Unit]
2703 Description=Some HTTP Server
2704 After=remote-fs.target sqldb.service <emphasis>memcached.service</emphasis>
2705 Requires=sqldb.service <emphasis>memcached.service</emphasis>
2706 AssertPathExists=<emphasis>/srv/www</emphasis>
2707
2708 [Service]
2709 Type=notify
2710 ExecStart=/usr/sbin/some-fancy-httpd-server
2711 <emphasis>Nice=0</emphasis>
2712 <emphasis>PrivateTmp=yes</emphasis>
2713
2714 [Install]
2715 WantedBy=multi-user.target</programlisting>
2716
2717 <para>Alternatively, the administrator could create a drop-in
2718 file
2719 <filename>/etc/systemd/system/httpd.service.d/local.conf</filename>
2720 with the following contents:</para>
2721
2722 <programlisting>[Unit]
2723 After=memcached.service
2724 Requires=memcached.service
2725 # Reset all assertions and then re-add the condition we want
2726 AssertPathExists=
2727 AssertPathExists=/srv/www
2728
2729 [Service]
2730 Nice=0
2731 PrivateTmp=yes</programlisting>
2732
2733 <para>Note that for drop-in files, if one wants to remove
2734 entries from a setting that is parsed as a list (and is not a
2735 dependency), such as <varname>AssertPathExists=</varname> (or
2736 e.g. <varname>ExecStart=</varname> in service units), one needs
2737 to first clear the list before re-adding all entries except the
2738 one that is to be removed. Dependencies (<varname>After=</varname>, etc.)
2739 cannot be reset to an empty list, so dependencies can only be
2740 added in drop-ins. If you want to remove dependencies, you have
2741 to override the entire unit.</para>
2742
2743 </example>
2744
2745 <example>
2746 <title>Top level drop-ins with template units</title>
2747
2748 <para>Top level per-type drop-ins can be used to change some aspect of
2749 all units of a particular type. For example, by creating the
2750 <filename index='false'>/etc/systemd/system/service.d/</filename>
2751 directory with a drop-in file, the contents of the drop-in file can be
2752 applied to all service units. We can take this further by having the
2753 top-level drop-in instantiate a secondary helper unit. Consider for
2754 example the following set of units and drop-in files where we install
2755 an <varname>OnFailure=</varname> dependency for all service units.</para>
2756
2757 <para>
2758 <filename index='false'>/etc/systemd/system/[email protected]</filename>:</para>
2759
2760 <programlisting>[Unit]
2761 Description=My Failure Handler For %i
2762
2763 [Service]
2764 Type=oneshot
2765 # Perform some special action for when %i exits unexpectedly.
2766 ExecStart=/usr/sbin/myfailurehandler %i
2767 </programlisting>
2768
2769 <para>We can then add an instance of
2770 <filename index='false'>[email protected]</filename> as an
2771 <varname>OnFailure=</varname> dependency for all service units.</para>
2772
2773 <para>
2774 <filename index='false'>/etc/systemd/system/service.d/10-all.conf</filename>:</para>
2775
2776 <programlisting>[Unit]
2777 OnFailure=failure-handler@%N.service
2778 </programlisting>
2779
2780 <para>Now, after running <command>systemctl daemon-reload</command> all
2781 services will have acquired an <varname>OnFailure=</varname> dependency on
2782 <filename index='false'>failure-handler@%N.service</filename>. The
2783 template instance units will also have gained the dependency which results
2784 in the creation of a recursive dependency chain. systemd will try to detect
2785 these recursive dependency chains where a template unit directly and
2786 recursively depends on itself and will remove such dependencies
2787 automatically if it finds them. If systemd does not detect the recursive
2788 dependency chain, we can break the chain ourselves by disabling the drop-in
2789 for the template instance units via a symlink to
2790 <filename index='false'>/dev/null</filename>:</para>
2791
2792 <programlisting>
2793 <command>mkdir /etc/systemd/system/[email protected]/</command>
2794 <command>ln -s /dev/null /etc/systemd/system/[email protected]/10-all.conf</command>
2795 <command>systemctl daemon-reload</command>
2796 </programlisting>
2797
2798 <para>This ensures that if a <filename index='false'>[email protected]</filename> instance fails it will not trigger an instance named
2799 <filename index='false'>[email protected]</filename>.</para>
2800
2801 </example>
2802
2803 </refsect1>
2804
2805 <refsect1>
2806 <title>See Also</title>
2807 <para><simplelist type="inline">
2808 <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
2809 <member><citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
2810 <member><citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
2811 <member><citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
2812 <member><citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
2813 <member><citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
2814 <member><citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
2815 <member><citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
2816 <member><citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
2817 <member><citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
2818 <member><citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
2819 <member><citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
2820 <member><citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
2821 <member><citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
2822 <member><citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
2823 <member><citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
2824 <member><citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
2825 <member><citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
2826 <member><citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
2827 <member><citerefentry project='man-pages'><refentrytitle>uname</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
2828 </simplelist></para>
2829 </refsect1>
2830 </refentry>