]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd.unit.xml
man: describe ordering in case of Conflicts=
[thirdparty/systemd.git] / man / systemd.unit.xml
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.2/docbookx.dtd" [
4 <!ENTITY % entities SYSTEM "custom-entities.ent" >
5 %entities;
6 ]>
7 <!-- SPDX-License-Identifier: LGPL-2.1+ -->
8
9 <refentry id="systemd.unit">
10
11 <refentryinfo>
12 <title>systemd.unit</title>
13 <productname>systemd</productname>
14 </refentryinfo>
15
16 <refmeta>
17 <refentrytitle>systemd.unit</refentrytitle>
18 <manvolnum>5</manvolnum>
19 </refmeta>
20
21 <refnamediv>
22 <refname>systemd.unit</refname>
23 <refpurpose>Unit configuration</refpurpose>
24 </refnamediv>
25
26 <refsynopsisdiv>
27 <para><filename><replaceable>service</replaceable>.service</filename>,
28 <filename><replaceable>socket</replaceable>.socket</filename>,
29 <filename><replaceable>device</replaceable>.device</filename>,
30 <filename><replaceable>mount</replaceable>.mount</filename>,
31 <filename><replaceable>automount</replaceable>.automount</filename>,
32 <filename><replaceable>swap</replaceable>.swap</filename>,
33 <filename><replaceable>target</replaceable>.target</filename>,
34 <filename><replaceable>path</replaceable>.path</filename>,
35 <filename><replaceable>timer</replaceable>.timer</filename>,
36 <filename><replaceable>slice</replaceable>.slice</filename>,
37 <filename><replaceable>scope</replaceable>.scope</filename></para>
38
39 <refsect2>
40 <title>System Unit Search Path</title>
41
42 <para><literallayout><filename>/etc/systemd/system.control/*</filename>
43 <filename>/run/systemd/system.control/*</filename>
44 <filename>/run/systemd/transient/*</filename>
45 <filename>/run/systemd/generator.early/*</filename>
46 <filename>/etc/systemd/system/*</filename>
47 <filename>/etc/systemd/systemd.attached/*</filename>
48 <filename>/run/systemd/system/*</filename>
49 <filename>/run/systemd/systemd.attached/*</filename>
50 <filename>/run/systemd/generator/*</filename>
51 <filename></filename>
52 <filename>/usr/lib/systemd/system/*</filename>
53 <filename>/run/systemd/generator.late/*</filename></literallayout></para>
54 </refsect2>
55
56 <refsect2>
57 <title>User Unit Search Path</title>
58 <para><literallayout><filename>~/.config/systemd/user.control/*</filename>
59 <filename>$XDG_RUNTIME_DIR/systemd/user.control/*</filename>
60 <filename>$XDG_RUNTIME_DIR/systemd/transient/*</filename>
61 <filename>$XDG_RUNTIME_DIR/systemd/generator.early/*</filename>
62 <filename>~/.config/systemd/user/*</filename>
63 <filename>/etc/systemd/user/*</filename>
64 <filename>$XDG_RUNTIME_DIR/systemd/user/*</filename>
65 <filename>/run/systemd/user/*</filename>
66 <filename>$XDG_RUNTIME_DIR/systemd/generator/*</filename>
67 <filename>~/.local/share/systemd/user/*</filename>
68 <filename></filename>
69 <filename>/usr/lib/systemd/user/*</filename>
70 <filename>$XDG_RUNTIME_DIR/systemd/generator.late/*</filename></literallayout></para>
71 </refsect2>
72
73 </refsynopsisdiv>
74
75 <refsect1>
76 <title>Description</title>
77
78 <para>A unit file is a plain text ini-style file that encodes information about a service, a
79 socket, a device, a mount point, an automount point, a swap file or partition, a start-up
80 target, a watched file system path, a timer controlled and supervised by
81 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, a
82 resource management slice or a group of externally created processes. See
83 <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>5</manvolnum></citerefentry>
84 for a general description of the syntax.</para>
85
86 <para>This man page lists the common configuration options of all
87 the unit types. These options need to be configured in the [Unit]
88 or [Install] sections of the unit files.</para>
89
90 <para>In addition to the generic [Unit] and [Install] sections
91 described here, each unit may have a type-specific section, e.g.
92 [Service] for a service unit. See the respective man pages for
93 more information:
94 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
95 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
96 <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
97 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
98 <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
99 <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
100 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
101 <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
102 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
103 <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
104 <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
105 </para>
106
107 <para>Unit files are loaded from a set of paths determined during compilation, described in the next
108 section.</para>
109
110 <para>Valid unit names consist of a "name prefix" and a dot and a suffix specifying the unit type. The
111 "unit prefix" must consist of one or more valid characters (ASCII letters, digits, <literal>:</literal>,
112 <literal>-</literal>, <literal>_</literal>, <literal>.</literal>, and <literal>\</literal>). The total
113 length of the unit name including the suffix must not exceed 256 characters. The type suffix must be one
114 of <literal>.service</literal>, <literal>.socket</literal>, <literal>.device</literal>,
115 <literal>.mount</literal>, <literal>.automount</literal>, <literal>.swap</literal>,
116 <literal>.target</literal>, <literal>.path</literal>, <literal>.timer</literal>,
117 <literal>.slice</literal>, or <literal>.scope</literal>.</para>
118
119 <para>Units names can be parameterized by a single argument called the "instance name". The unit is then
120 constructed based on a "template file" which serves as the definition of multiple services or other
121 units. A template unit must have a single <literal>@</literal> at the end of the name (right before the
122 type suffix). The name of the full unit is formed by inserting the instance name between
123 <literal>@</literal> and the unit type suffix. In the unit file itself, the instance parameter may be
124 referred to using <literal>%i</literal> and other specifiers, see below.</para>
125
126 <para>Unit files may contain additional options on top of those
127 listed here. If systemd encounters an unknown option, it will
128 write a warning log message but continue loading the unit. If an
129 option or section name is prefixed with <option>X-</option>, it is
130 ignored completely by systemd. Options within an ignored section
131 do not need the prefix. Applications may use this to include
132 additional information in the unit files.</para>
133
134 <para>Units can be aliased (have an alternative name), by creating a symlink from the new name to the
135 existing name in one of the unit search paths. For example, <filename>systemd-networkd.service</filename>
136 has the alias <filename>dbus-org.freedesktop.network1.service</filename>, created during installation as
137 a symlink, so when <command>systemd</command> is asked through D-Bus to load
138 <filename>dbus-org.freedesktop.network1.service</filename>, it'll load
139 <filename>systemd-networkd.service</filename>. Alias names may be used in commands like
140 <command>disable</command>, <command>start</command>, <command>stop</command>, <command>status</command>,
141 and similar, and in all unit dependency directives, including <varname>Wants=</varname>,
142 <varname>Requires=</varname>, <varname>Before=</varname>, <varname>After=</varname>. Aliases cannot be
143 used with the <command>preset</command> command.</para>
144
145 <para>Unit files may specify aliases through the <varname>Alias=</varname> directive in the [Install]
146 section. When the unit is enabled, symlinks will be created for those names, and removed when the unit is
147 disabled. For example, <filename>reboot.target</filename> specifies
148 <varname>Alias=ctrl-alt-del.target</varname>, so when enabled, the symlink
149 <filename>/etc/systemd/systemd/ctrl-alt-del.service</filename> pointing to the
150 <filename>reboot.target</filename> file will be created, and when
151 <keycombo><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>Del</keycap></keycombo> is invoked,
152 <command>systemd</command> will look for the <filename>ctrl-alt-del.service</filename> and execute
153 <filename>reboot.service</filename>. <command>systemd</command> does not look at the [Install] section at
154 all during normal operation, so any directives in that section only have an effect through the symlinks
155 created during enablement.</para>
156
157 <para>Along with a unit file <filename>foo.service</filename>, the directory
158 <filename>foo.service.wants/</filename> may exist. All unit files symlinked from such a directory are
159 implicitly added as dependencies of type <varname>Wants=</varname> to the unit. Similar functionality
160 exists for <varname>Requires=</varname> type dependencies as well, the directory suffix is
161 <filename>.requires/</filename> in this case. This functionality is useful to hook units into the
162 start-up of other units, without having to modify their unit files. For details about the semantics of
163 <varname>Wants=</varname>, see below. The preferred way to create symlinks in the
164 <filename>.wants/</filename> or <filename>.requires/</filename> directory of a unit file is by embedding
165 the dependency in [Install] section of the target unit, and creating the symlink in the file system with
166 the <command>enable</command> or <command>preset</command> commands of
167 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
168
169 <para>Along with a unit file <filename>foo.service</filename>, a "drop-in" directory
170 <filename>foo.service.d/</filename> may exist. All files with the suffix <literal>.conf</literal> from this
171 directory will be parsed after the unit file itself is parsed. This is useful to alter or add configuration
172 settings for a unit, without having to modify unit files. Drop-in files must contain appropriate section
173 headers. For instantiated units, this logic will first look for the instance <literal>.d/</literal> subdirectory
174 (e.g. <literal>foo@bar.service.d/</literal>) and read its <literal>.conf</literal> files, followed by the template
175 <literal>.d/</literal> subdirectory (e.g. <literal>foo@.service.d/</literal>) and the <literal>.conf</literal>
176 files there. Moreover for units names containing dashes (<literal>-</literal>), the set of directories generated by
177 truncating the unit name after all dashes is searched too. Specifically, for a unit name
178 <filename>foo-bar-baz.service</filename> not only the regular drop-in directory
179 <filename>foo-bar-baz.service.d/</filename> is searched but also both <filename>foo-bar-.service.d/</filename> and
180 <filename>foo-.service.d/</filename>. This is useful for defining common drop-ins for a set of related units, whose
181 names begin with a common prefix. This scheme is particularly useful for mount, automount and slice units, whose
182 systematic naming structure is built around dashes as component separators. Note that equally named drop-in files
183 further down the prefix hierarchy override those further up,
184 i.e. <filename>foo-bar-.service.d/10-override.conf</filename> overrides
185 <filename>foo-.service.d/10-override.conf</filename>.</para>
186
187 <para>In addition to <filename>/etc/systemd/system</filename>, the drop-in <literal>.d/</literal>
188 directories for system services can be placed in <filename>/usr/lib/systemd/system</filename> or
189 <filename>/run/systemd/system</filename> directories. Drop-in files in <filename>/etc</filename>
190 take precedence over those in <filename>/run</filename> which in turn take precedence over those
191 in <filename>/usr/lib</filename>. Drop-in files under any of these directories take precedence
192 over unit files wherever located. Multiple drop-in files with different names are applied in
193 lexicographic order, regardless of which of the directories they reside in.</para>
194
195 <para>Service units also support a top-level drop-in directory for modifying the settings of all service units. See
196 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
197 for details.</para>
198
199 <!-- Note that we do not document .include here, as we consider it mostly obsolete, and want
200 people to use .d/ drop-ins instead. -->
201
202 <para>Note that while systemd offers a flexible dependency system
203 between units it is recommended to use this functionality only
204 sparingly and instead rely on techniques such as bus-based or
205 socket-based activation which make dependencies implicit,
206 resulting in a both simpler and more flexible system.</para>
207
208 <para>As mentioned above, a unit may be instantiated from a template file. This allows creation
209 of multiple units from a single configuration file. If systemd looks for a unit configuration
210 file, it will first search for the literal unit name in the file system. If that yields no
211 success and the unit name contains an <literal>@</literal> character, systemd will look for a
212 unit template that shares the same name but with the instance string (i.e. the part between the
213 <literal>@</literal> character and the suffix) removed. Example: if a service
214 <filename>getty@tty3.service</filename> is requested and no file by that name is found, systemd
215 will look for <filename>getty@.service</filename> and instantiate a service from that
216 configuration file if it is found.</para>
217
218 <para>To refer to the instance string from within the
219 configuration file you may use the special <literal>%i</literal>
220 specifier in many of the configuration options. See below for
221 details.</para>
222
223 <para>If a unit file is empty (i.e. has the file size 0) or is
224 symlinked to <filename>/dev/null</filename>, its configuration
225 will not be loaded and it appears with a load state of
226 <literal>masked</literal>, and cannot be activated. Use this as an
227 effective way to fully disable a unit, making it impossible to
228 start it even manually.</para>
229
230 <para>The unit file format is covered by the
231 <ulink
232 url="https://www.freedesktop.org/wiki/Software/systemd/InterfaceStabilityPromise">Interface
233 Stability Promise</ulink>.</para>
234
235 </refsect1>
236
237 <refsect1>
238 <title>String Escaping for Inclusion in Unit Names</title>
239
240 <para>Sometimes it is useful to convert arbitrary strings into unit names. To facilitate this, a method of string
241 escaping is used, in order to map strings containing arbitrary byte values (except NUL) into valid unit names and
242 their restricted character set. A common special case are unit names that reflect paths to objects in the file
243 system hierarchy. Example: a device unit <filename>dev-sda.device</filename> refers to a device with the device
244 node <filename noindex='true'>/dev/sda</filename> in the file system.</para>
245
246 <para>The escaping algorithm operates as follows: given a string, any <literal>/</literal> character is replaced by
247 <literal>-</literal>, and all other characters which are not ASCII alphanumerics or <literal>_</literal> are
248 replaced by C-style <literal>\x2d</literal> escapes. In addition, <literal>.</literal> is replaced with such a
249 C-style escape when it would appear as the first character in the escaped string.</para>
250
251 <para>When the input qualifies as absolute file system path, this algorithm is extended slightly: the path to the
252 root directory <literal>/</literal> is encoded as single dash <literal>-</literal>. In addition, any leading,
253 trailing or duplicate <literal>/</literal> characters are removed from the string before transformation. Example:
254 <filename>/foo//bar/baz/</filename> becomes <literal>foo-bar-baz</literal>.</para>
255
256 <para>This escaping is fully reversible, as long as it is known whether the escaped string was a path (the
257 unescaping results are different for paths and non-path strings). The
258 <citerefentry><refentrytitle>systemd-escape</refentrytitle><manvolnum>1</manvolnum></citerefentry> command may be
259 used to apply and reverse escaping on arbitrary strings. Use <command>systemd-escape --path</command> to escape
260 path strings, and <command>systemd-escape</command> without <option>--path</option> otherwise.</para>
261 </refsect1>
262
263 <refsect1>
264 <title>Automatic dependencies</title>
265
266 <refsect2>
267 <title>Implicit Dependencies</title>
268
269 <para>A number of unit dependencies are implicitly established, depending on unit type and
270 unit configuration. These implicit dependencies can make unit configuration file cleaner. For
271 the implicit dependencies in each unit type, please refer to section "Implicit Dependencies"
272 in respective man pages.</para>
273
274 <para>For example, service units with <varname>Type=dbus</varname> automatically acquire
275 dependencies of type <varname>Requires=</varname> and <varname>After=</varname> on
276 <filename>dbus.socket</filename>. See
277 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
278 for details.</para>
279 </refsect2>
280
281 <refsect2>
282 <title>Default Dependencies</title>
283
284 <para>Default dependencies are similar to implicit dependencies, but can be turned on and off
285 by setting <varname>DefaultDependencies=</varname> to <varname>yes</varname> (the default) and
286 <varname>no</varname>, while implicit dependencies are always in effect. See section "Default
287 Dependencies" in respective man pages for the effect of enabling
288 <varname>DefaultDependencies=</varname> in each unit types.</para>
289
290 <para>For example, target units will complement all configured dependencies of type
291 <varname>Wants=</varname> or <varname>Requires=</varname> with dependencies of type
292 <varname>After=</varname> unless <varname>DefaultDependencies=no</varname> is set in the
293 specified units. See
294 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>
295 for details. Note that this behavior can be turned off by setting
296 <varname>DefaultDependencies=no</varname>.</para>
297 </refsect2>
298 </refsect1>
299
300 <refsect1>
301 <title>Unit File Load Path</title>
302
303 <para>Unit files are loaded from a set of paths determined during
304 compilation, described in the two tables below. Unit files found
305 in directories listed earlier override files with the same name in
306 directories lower in the list.</para>
307
308 <para>When the variable <varname>$SYSTEMD_UNIT_PATH</varname> is set,
309 the contents of this variable overrides the unit load path. If
310 <varname>$SYSTEMD_UNIT_PATH</varname> ends with an empty component
311 (<literal>:</literal>), the usual unit load path will be appended
312 to the contents of the variable.</para>
313
314 <table>
315 <title>
316 Load path when running in system mode (<option>--system</option>).
317 </title>
318
319 <tgroup cols='2'>
320 <colspec colname='path' />
321 <colspec colname='expl' />
322 <thead>
323 <row>
324 <entry>Path</entry>
325 <entry>Description</entry>
326 </row>
327 </thead>
328 <tbody>
329 <row>
330 <entry><filename>/etc/systemd/system.control</filename></entry>
331 <entry morerows="1">Persistent and transient configuration created using the dbus API</entry>
332 </row>
333 <row>
334 <entry><filename>/run/systemd/system.control</filename></entry>
335 </row>
336 <row>
337 <entry><filename>/run/systemd/transient</filename></entry>
338 <entry>Dynamic configuration for transient units</entry>
339 </row>
340 <row>
341 <entry><filename>/run/systemd/generator.early</filename></entry>
342 <entry>Generated units with high priority (see <replaceable>early-dir</replaceable> in <citerefentry
343 ><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>)</entry>
344 </row>
345 <row>
346 <entry><filename>/etc/systemd/system</filename></entry>
347 <entry>System units created by the administrator</entry>
348 </row>
349 <row>
350 <entry><filename>/run/systemd/system</filename></entry>
351 <entry>Runtime units</entry>
352 </row>
353 <row>
354 <entry><filename>/run/systemd/generator</filename></entry>
355 <entry>Generated units with medium priority (see <replaceable>normal-dir</replaceable> in <citerefentry
356 ><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>)</entry>
357 </row>
358 <row>
359 <entry><filename>/usr/local/lib/systemd/system</filename></entry>
360 <entry>System units installed by the administrator </entry>
361 </row>
362 <row>
363 <entry><filename>/usr/lib/systemd/system</filename></entry>
364 <entry>System units installed by the distribution package manager</entry>
365 </row>
366 <row>
367 <entry><filename>/run/systemd/generator.late</filename></entry>
368 <entry>Generated units with low priority (see <replaceable>late-dir</replaceable> in <citerefentry
369 ><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>)</entry>
370 </row>
371 </tbody>
372 </tgroup>
373 </table>
374
375 <table>
376 <title>
377 Load path when running in user mode (<option>--user</option>).
378 </title>
379
380 <tgroup cols='2'>
381 <colspec colname='path' />
382 <colspec colname='expl' />
383 <thead>
384 <row>
385 <entry>Path</entry>
386 <entry>Description</entry>
387 </row>
388 </thead>
389 <tbody>
390 <row>
391 <entry><filename>$XDG_CONFIG_HOME/systemd/user.control</filename> or <filename
392 >~/.config/systemd/user.control</filename></entry>
393 <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>
394 </row>
395 <row>
396 <entry><filename>$XDG_RUNTIME_DIR/systemd/user.control</filename></entry>
397 </row>
398 <row>
399 <entry><filename>/run/systemd/transient</filename></entry>
400 <entry>Dynamic configuration for transient units</entry>
401 </row>
402 <row>
403 <entry><filename>/run/systemd/generator.early</filename></entry>
404 <entry>Generated units with high priority (see <replaceable>early-dir</replaceable> in <citerefentry
405 ><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>)</entry>
406 </row>
407 <row>
408 <entry><filename>$XDG_CONFIG_HOME/systemd/user</filename> or <filename>$HOME/.config/systemd/user</filename></entry>
409 <entry>User configuration (<varname>$XDG_CONFIG_HOME</varname> is used if set, <filename>~/.config</filename> otherwise)</entry>
410 </row>
411 <row>
412 <entry><filename>/etc/systemd/user</filename></entry>
413 <entry>User units created by the administrator</entry>
414 </row>
415 <row>
416 <entry><filename>$XDG_RUNTIME_DIR/systemd/user</filename></entry>
417 <entry>Runtime units (only used when $XDG_RUNTIME_DIR is set)</entry>
418 </row>
419 <row>
420 <entry><filename>/run/systemd/user</filename></entry>
421 <entry>Runtime units</entry>
422 </row>
423 <row>
424 <entry><filename>$XDG_RUNTIME_DIR/systemd/generator</filename></entry>
425 <entry>Generated units with medium priority (see <replaceable>normal-dir</replaceable> in <citerefentry
426 ><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>)</entry>
427 </row>
428 <row>
429 <entry><filename>$XDG_DATA_HOME/systemd/user</filename> or <filename>$HOME/.local/share/systemd/user</filename></entry>
430 <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>
431 </row>
432 <row>
433 <entry><filename>$dir/systemd/user</filename> for each <varname noindex='true'>$dir</varname> in <varname>$XDG_DATA_DIRS</varname></entry>
434 <entry>Additional locations for installed user units, one for each entry in <varname>$XDG_DATA_DIRS</varname></entry>
435 </row>
436 <row>
437 <entry><filename>/usr/local/lib/systemd/user</filename></entry>
438 <entry>User units installed by the administrator</entry>
439 </row>
440 <row>
441 <entry><filename>/usr/lib/systemd/user</filename></entry>
442 <entry>User units installed by the distribution package manager</entry>
443 </row>
444 <row>
445 <entry><filename>$XDG_RUNTIME_DIR/systemd/generator.late</filename></entry>
446 <entry>Generated units with low priority (see <replaceable>late-dir</replaceable> in <citerefentry
447 ><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>)</entry>
448 </row>
449 </tbody>
450 </tgroup>
451 </table>
452
453 <para>The set of load paths for the user manager instance may be augmented or
454 changed using various environment variables. And environment variables may in
455 turn be set using environment generators, see
456 <citerefentry><refentrytitle>systemd.environment-generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
457 In particular, <varname>$XDG_DATA_HOME</varname> and
458 <varname>$XDG_DATA_DIRS</varname> may be easily set using
459 <citerefentry><refentrytitle>systemd-environment-d-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
460 Thus, directories listed here are just the defaults. To see the actual list that
461 would be used based on compilation options and current environment use
462 <programlisting>systemd-analyze --user unit-paths</programlisting>
463 </para>
464
465 <para>Moreover, additional units might be loaded into systemd ("linked") from
466 directories not on the unit load path. See the <command>link</command> command
467 for
468 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
469 </para>
470 </refsect1>
471
472 <refsect1>
473 <title>Unit Garbage Collection</title>
474
475 <para>The system and service manager loads a unit's configuration automatically when a unit is referenced for the
476 first time. It will automatically unload the unit configuration and state again when the unit is not needed anymore
477 ("garbage collection"). A unit may be referenced through a number of different mechanisms:</para>
478
479 <orderedlist>
480 <listitem><para>Another loaded unit references it with a dependency such as <varname>After=</varname>,
481 <varname>Wants=</varname>, …</para></listitem>
482
483 <listitem><para>The unit is currently starting, running, reloading or stopping.</para></listitem>
484
485 <listitem><para>The unit is currently in the <constant>failed</constant> state. (But see below.)</para></listitem>
486
487 <listitem><para>A job for the unit is pending.</para></listitem>
488
489 <listitem><para>The unit is pinned by an active IPC client program.</para></listitem>
490
491 <listitem><para>The unit is a special "perpetual" unit that is always active and loaded. Examples for perpetual
492 units are the root mount unit <filename>-.mount</filename> or the scope unit <filename>init.scope</filename> that
493 the service manager itself lives in.</para></listitem>
494
495 <listitem><para>The unit has running processes associated with it.</para></listitem>
496 </orderedlist>
497
498 <para>The garbage collection logic may be altered with the <varname>CollectMode=</varname> option, which allows
499 configuration whether automatic unloading of units that are in <constant>failed</constant> state is permissible,
500 see below.</para>
501
502 <para>Note that when a unit's configuration and state is unloaded, all execution results, such as exit codes, exit
503 signals, resource consumption and other statistics are lost, except for what is stored in the log subsystem.</para>
504
505 <para>Use <command>systemctl daemon-reload</command> or an equivalent command to reload unit configuration while
506 the unit is already loaded. In this case all configuration settings are flushed out and replaced with the new
507 configuration (which however might not be in effect immediately), however all runtime state is
508 saved/restored.</para>
509 </refsect1>
510
511 <refsect1>
512 <title>[Unit] Section Options</title>
513
514 <para>The unit file may include a [Unit] section, which carries
515 generic information about the unit that is not dependent on the
516 type of unit:</para>
517
518 <variablelist class='unit-directives'>
519 <varlistentry>
520 <term><varname>Description=</varname></term>
521 <listitem><para>A human readable name for the unit. This is used by
522 <command>systemd</command> (and other UIs) as the label for the unit, so this string should
523 identify the unit rather than describe it, despite the name. <literal>Apache2 Web
524 Server</literal> is a good example. Bad examples are <literal>high-performance light-weight
525 HTTP server</literal> (too generic) or <literal>Apache2</literal> (too specific and
526 meaningless for people who do not know Apache). <command>systemd</command> will use this
527 string as a noun in status messages (<literal>Starting
528 <replaceable>description</replaceable>...</literal>, <literal>Started
529 <replaceable>description</replaceable>.</literal>, <literal>Reached target
530 <replaceable>description</replaceable>.</literal>, <literal>Failed to start
531 <replaceable>description</replaceable>.</literal>), so it should be capitalized, and should
532 not be a full sentence or a phrase with a continuous verb. Bad examples include
533 <literal>exiting the container</literal> or <literal>updating the database once per
534 day.</literal>.</para>
535 </listitem>
536 </varlistentry>
537
538 <varlistentry>
539 <term><varname>Documentation=</varname></term>
540 <listitem><para>A space-separated list of URIs referencing
541 documentation for this unit or its configuration. Accepted are
542 only URIs of the types <literal>http://</literal>,
543 <literal>https://</literal>, <literal>file:</literal>,
544 <literal>info:</literal>, <literal>man:</literal>. For more
545 information about the syntax of these URIs, see <citerefentry
546 project='man-pages'><refentrytitle>uri</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
547 The URIs should be listed in order of relevance, starting with
548 the most relevant. It is a good idea to first reference
549 documentation that explains what the unit's purpose is,
550 followed by how it is configured, followed by any other
551 related documentation. This option may be specified more than
552 once, in which case the specified list of URIs is merged. If
553 the empty string is assigned to this option, the list is reset
554 and all prior assignments will have no
555 effect.</para></listitem>
556 </varlistentry>
557
558 <varlistentry>
559 <term><varname>Wants=</varname></term>
560
561 <listitem><para>Configures requirement dependencies on other units. This option may be specified more
562 than once or multiple space-separated units may be specified in one option in which case dependencies
563 for all listed names will be created. Dependencies of this type may also be configured outside of the
564 unit configuration file by adding a symlink to a <filename>.wants/</filename> directory accompanying
565 the unit file. For details, see above.</para>
566
567 <para>Units listed in this option will be started if the configuring unit is. However, if the listed
568 units fail to start or cannot be added to the transaction, this has no impact on the validity of the
569 transaction as a whole, and this unit will still be started. This is the recommended way to hook
570 start-up of one unit to the start-up of another unit.</para>
571
572 <para>Note that requirement dependencies do not influence the order in which services are started or
573 stopped. This has to be configured independently with the <varname>After=</varname> or
574 <varname>Before=</varname> options. If unit <filename>foo.service</filename> pulls in unit
575 <filename>bar.service</filename> as configured with <varname>Wants=</varname> and no ordering is
576 configured with <varname>After=</varname> or <varname>Before=</varname>, then both units will be
577 started simultaneously and without any delay between them if <filename>foo.service</filename> is
578 activated.</para></listitem>
579 </varlistentry>
580
581 <varlistentry>
582 <term><varname>Requires=</varname></term>
583
584 <listitem><para>Similar to <varname>Wants=</varname>, but declares a stronger
585 dependency. Dependencies of this type may also be configured by adding a symlink to a
586 <filename>.requires/</filename> directory accompanying the unit file.</para>
587
588 <para>If this unit gets activated, the units listed will be activated as well. If one of
589 the other units fails to activate, and an ordering dependency <varname>After=</varname> on the
590 failing unit is set, this unit will not be started. Besides, with or without specifying
591 <varname>After=</varname>, this unit will be stopped if one of the other units is explicitly
592 stopped.</para>
593
594 <para>Often, it is a better choice to use <varname>Wants=</varname> instead of
595 <varname>Requires=</varname> in order to achieve a system that is more robust when dealing with
596 failing services.</para>
597
598 <para>Note that this dependency type does not imply that the other unit always has to be in active state when
599 this unit is running. Specifically: failing condition checks (such as <varname>ConditionPathExists=</varname>,
600 <varname>ConditionPathIsSymbolicLink=</varname>, … — see below) do not cause the start job of a unit with a
601 <varname>Requires=</varname> dependency on it to fail. Also, some unit types may deactivate on their own (for
602 example, a service process may decide to exit cleanly, or a device may be unplugged by the user), which is not
603 propagated to units having a <varname>Requires=</varname> dependency. Use the <varname>BindsTo=</varname>
604 dependency type together with <varname>After=</varname> to ensure that a unit may never be in active state
605 without a specific other unit also in active state (see below).</para></listitem>
606 </varlistentry>
607
608 <varlistentry>
609 <term><varname>Requisite=</varname></term>
610
611 <listitem><para>Similar to <varname>Requires=</varname>. However, if the units listed here
612 are not started already, they will not be started and the starting of this unit will fail
613 immediately. <varname>Requisite=</varname> does not imply an ordering dependency, even if
614 both units are started in the same transaction. Hence this setting should usually be
615 combined with <varname>After=</varname>, to ensure this unit is not started before the other
616 unit.</para>
617
618 <para>When <varname>Requisite=b.service</varname> is used on
619 <filename>a.service</filename>, this dependency will show as
620 <varname>RequisiteOf=a.service</varname> in property listing of
621 <filename>b.service</filename>. <varname>RequisiteOf=</varname>
622 dependency cannot be specified directly.</para>
623 </listitem>
624 </varlistentry>
625
626 <varlistentry>
627 <term><varname>BindsTo=</varname></term>
628
629 <listitem><para>Configures requirement dependencies, very similar in style to
630 <varname>Requires=</varname>. However, this dependency type is stronger: in addition to the effect of
631 <varname>Requires=</varname> it declares that if the unit bound to is stopped, this unit will be stopped
632 too. This means a unit bound to another unit that suddenly enters inactive state will be stopped too.
633 Units can suddenly, unexpectedly enter inactive state for different reasons: the main process of a service unit
634 might terminate on its own choice, the backing device of a device unit might be unplugged or the mount point of
635 a mount unit might be unmounted without involvement of the system and service manager.</para>
636
637 <para>When used in conjunction with <varname>After=</varname> on the same unit the behaviour of
638 <varname>BindsTo=</varname> is even stronger. In this case, the unit bound to strictly has to be in active
639 state for this unit to also be in active state. This not only means a unit bound to another unit that suddenly
640 enters inactive state, but also one that is bound to another unit that gets skipped due to a failed condition
641 check (such as <varname>ConditionPathExists=</varname>, <varname>ConditionPathIsSymbolicLink=</varname>, … —
642 see below) will be stopped, should it be running. Hence, in many cases it is best to combine
643 <varname>BindsTo=</varname> with <varname>After=</varname>.</para>
644
645 <para>When <varname>BindsTo=b.service</varname> is used on
646 <filename>a.service</filename>, this dependency will show as
647 <varname>BoundBy=a.service</varname> in property listing of
648 <filename>b.service</filename>. <varname>BoundBy=</varname>
649 dependency cannot be specified directly.</para>
650 </listitem>
651 </varlistentry>
652
653 <varlistentry>
654 <term><varname>PartOf=</varname></term>
655
656 <listitem><para>Configures dependencies similar to
657 <varname>Requires=</varname>, but limited to stopping and
658 restarting of units. When systemd stops or restarts the units
659 listed here, the action is propagated to this unit. Note that
660 this is a one-way dependency — changes to this unit do not
661 affect the listed units.</para>
662
663 <para>When <varname>PartOf=b.service</varname> is used on
664 <filename>a.service</filename>, this dependency will show as
665 <varname>ConsistsOf=a.service</varname> in property listing of
666 <filename>b.service</filename>. <varname>ConsistsOf=</varname>
667 dependency cannot be specified directly.</para>
668 </listitem>
669 </varlistentry>
670
671 <varlistentry>
672 <term><varname>Conflicts=</varname></term>
673
674 <listitem><para>A space-separated list of unit names. Configures negative requirement
675 dependencies. If a unit has a <varname>Conflicts=</varname> setting on another unit, starting the
676 former will stop the latter and vice versa.</para>
677
678 <para>Note that this setting does not imply an ordering dependency, similarly to the
679 <varname>Wants=</varname> and <varname>Requires=</varname> dependencies described above. This means
680 that to ensure that the conflicting unit is stopped before the other unit is started, an
681 <varname>After=</varname> or <varname>Before=</varname> dependency must be declared. It doesn't
682 matter which of the two ordering dependencies is used, because stop jobs are always ordered before
683 start jobs, see the discussion in <varname>Before=</varname>/<varname>After=</varname> below.</para>
684
685 <para>If unit A that conflicts with unit B is scheduled to
686 be started at the same time as B, the transaction will either
687 fail (in case both are required parts of the transaction) or be
688 modified to be fixed (in case one or both jobs are not a
689 required part of the transaction). In the latter case, the job
690 that is not required will be removed, or in case both are
691 not required, the unit that conflicts will be started and the
692 unit that is conflicted is stopped.</para></listitem>
693 </varlistentry>
694
695 <varlistentry>
696 <term><varname>Before=</varname></term>
697 <term><varname>After=</varname></term>
698
699 <listitem><para>These two settings expect a space-separated list of unit names. They may be specified
700 more than once, in which case dependencies for all listed names are created.</para>
701
702 <para>Those two setttings configure ordering dependencies between units. If unit
703 <filename>foo.service</filename> contains the setting <option>Before=bar.service</option> and both
704 units are being started, <filename>bar.service</filename>'s start-up is delayed until
705 <filename>foo.service</filename> has finished starting up. <varname>After=</varname> is the inverse
706 of <varname>Before=</varname>, i.e. while <varname>Before=</varname> ensures that the configured unit
707 is started before the listed unit begins starting up, <varname>After=</varname> ensures the opposite,
708 that the listed unit is fully started up before the configured unit is started.</para>
709
710 <para>When two units with an ordering dependency between them are shut down, the inverse of the
711 start-up order is applied. i.e. if a unit is configured with <varname>After=</varname> on another
712 unit, the former is stopped before the latter if both are shut down. Given two units with any
713 ordering dependency between them, if one unit is shut down and the other is started up, the shutdown
714 is ordered before the start-up. It doesn't matter if the ordering dependency is
715 <varname>After=</varname> or <varname>Before=</varname>, in this case. It also doesn't matter which
716 of the two is shut down, as long as one is shut down and the other is started up; the shutdown is
717 ordered before the start-up in all cases. If two units have no ordering dependencies between them,
718 they are shut down or started up simultaneously, and no ordering takes place. It depends on the unit
719 type when precisely a unit has finished starting up. Most importantly, for service units start-up is
720 considered completed for the purpose of <varname>Before=</varname>/<varname>After=</varname> when all
721 its configured start-up commands have been invoked and they either failed or reported start-up
722 success.</para>
723
724 <para>Note that those settings are independent of and orthogonal to the requirement dependencies as
725 configured by <varname>Requires=</varname>, <varname>Wants=</varname>, <varname>Requisite=</varname>,
726 or <varname>BindsTo=</varname>. It is a common pattern to include a unit name in both the
727 <varname>After=</varname> and <varname>Wants=</varname> options, in which case the unit listed will
728 be started before the unit that is configured with these options.</para></listitem>
729 </varlistentry>
730
731 <varlistentry>
732 <term><varname>OnFailure=</varname></term>
733
734 <listitem><para>A space-separated list of one or more units
735 that are activated when this unit enters the
736 <literal>failed</literal> state. A service unit using
737 <varname>Restart=</varname> enters the failed state only after
738 the start limits are reached.</para></listitem>
739 </varlistentry>
740
741 <varlistentry>
742 <term><varname>PropagatesReloadTo=</varname></term>
743 <term><varname>ReloadPropagatedFrom=</varname></term>
744
745 <listitem><para>A space-separated list of one or more units
746 where reload requests on this unit will be propagated to, or
747 reload requests on the other unit will be propagated to this
748 unit, respectively. Issuing a reload request on a unit will
749 automatically also enqueue a reload request on all units that
750 the reload request shall be propagated to via these two
751 settings.</para></listitem>
752 </varlistentry>
753
754 <varlistentry>
755 <term><varname>JoinsNamespaceOf=</varname></term>
756
757 <listitem><para>For units that start processes (such as service units), lists one or more other units
758 whose network and/or temporary file namespace to join. This only applies to unit types which support
759 the <varname>PrivateNetwork=</varname>, <varname>NetworkNamespacePath=</varname> and
760 <varname>PrivateTmp=</varname> directives (see
761 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
762 details). If a unit that has this setting set is started, its processes will see the same
763 <filename>/tmp</filename>, <filename>/var/tmp</filename> and network namespace as one listed unit
764 that is started. If multiple listed units are already started, it is not defined which namespace is
765 joined. Note that this setting only has an effect if
766 <varname>PrivateNetwork=</varname>/<varname>NetworkNamespacePath=</varname> and/or
767 <varname>PrivateTmp=</varname> is enabled for both the unit that joins the namespace and the unit
768 whose namespace is joined.</para></listitem>
769 </varlistentry>
770
771 <varlistentry>
772 <term><varname>RequiresMountsFor=</varname></term>
773
774 <listitem><para>Takes a space-separated list of absolute
775 paths. Automatically adds dependencies of type
776 <varname>Requires=</varname> and <varname>After=</varname> for
777 all mount units required to access the specified path.</para>
778
779 <para>Mount points marked with <option>noauto</option> are not
780 mounted automatically through <filename>local-fs.target</filename>,
781 but are still honored for the purposes of this option, i.e. they
782 will be pulled in by this unit.</para></listitem>
783 </varlistentry>
784
785 <varlistentry>
786 <term><varname>OnFailureJobMode=</varname></term>
787
788 <listitem><para>Takes a value of
789 <literal>fail</literal>,
790 <literal>replace</literal>,
791 <literal>replace-irreversibly</literal>,
792 <literal>isolate</literal>,
793 <literal>flush</literal>,
794 <literal>ignore-dependencies</literal> or
795 <literal>ignore-requirements</literal>. Defaults to
796 <literal>replace</literal>. Specifies how the units listed in
797 <varname>OnFailure=</varname> will be enqueued. See
798 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
799 <option>--job-mode=</option> option for details on the
800 possible values. If this is set to <literal>isolate</literal>,
801 only a single unit may be listed in
802 <varname>OnFailure=</varname>..</para></listitem>
803 </varlistentry>
804
805 <varlistentry>
806 <term><varname>IgnoreOnIsolate=</varname></term>
807
808 <listitem><para>Takes a boolean argument. If <option>true</option>, this unit
809 will not be stopped when isolating another unit. Defaults to
810 <option>false</option> for service, target, socket, busname, timer, and path
811 units, and <option>true</option> for slice, scope, device, swap, mount, and
812 automount units.</para></listitem>
813 </varlistentry>
814
815 <varlistentry>
816 <term><varname>StopWhenUnneeded=</varname></term>
817
818 <listitem><para>Takes a boolean argument. If
819 <option>true</option>, this unit will be stopped when it is no
820 longer used. Note that, in order to minimize the work to be
821 executed, systemd will not stop units by default unless they
822 are conflicting with other units, or the user explicitly
823 requested their shut down. If this option is set, a unit will
824 be automatically cleaned up if no other active unit requires
825 it. Defaults to <option>false</option>.</para></listitem>
826 </varlistentry>
827
828 <varlistentry>
829 <term><varname>RefuseManualStart=</varname></term>
830 <term><varname>RefuseManualStop=</varname></term>
831
832 <listitem><para>Takes a boolean argument. If
833 <option>true</option>, this unit can only be activated or
834 deactivated indirectly. In this case, explicit start-up or
835 termination requested by the user is denied, however if it is
836 started or stopped as a dependency of another unit, start-up
837 or termination will succeed. This is mostly a safety feature
838 to ensure that the user does not accidentally activate units
839 that are not intended to be activated explicitly, and not
840 accidentally deactivate units that are not intended to be
841 deactivated. These options default to
842 <option>false</option>.</para></listitem>
843 </varlistentry>
844
845 <varlistentry>
846 <term><varname>AllowIsolate=</varname></term>
847
848 <listitem><para>Takes a boolean argument. If
849 <option>true</option>, this unit may be used with the
850 <command>systemctl isolate</command> command. Otherwise, this
851 will be refused. It probably is a good idea to leave this
852 disabled except for target units that shall be used similar to
853 runlevels in SysV init systems, just as a precaution to avoid
854 unusable system states. This option defaults to
855 <option>false</option>.</para></listitem>
856 </varlistentry>
857
858 <varlistentry>
859 <term><varname>DefaultDependencies=</varname></term>
860
861 <listitem><para>Takes a boolean argument. If
862 <option>yes</option>, (the default), a few default
863 dependencies will implicitly be created for the unit. The
864 actual dependencies created depend on the unit type. For
865 example, for service units, these dependencies ensure that the
866 service is started only after basic system initialization is
867 completed and is properly terminated on system shutdown. See
868 the respective man pages for details. Generally, only services
869 involved with early boot or late shutdown should set this
870 option to <option>no</option>. It is highly recommended to
871 leave this option enabled for the majority of common units. If
872 set to <option>no</option>, this option does not disable
873 all implicit dependencies, just non-essential
874 ones.</para></listitem>
875 </varlistentry>
876
877 <varlistentry>
878 <term><varname>CollectMode=</varname></term>
879
880 <listitem><para>Tweaks the "garbage collection" algorithm for this unit. Takes one of <option>inactive</option>
881 or <option>inactive-or-failed</option>. If set to <option>inactive</option> the unit will be unloaded if it is
882 in the <constant>inactive</constant> state and is not referenced by clients, jobs or other units — however it
883 is not unloaded if it is in the <constant>failed</constant> state. In <option>failed</option> mode, failed
884 units are not unloaded until the user invoked <command>systemctl reset-failed</command> on them to reset the
885 <constant>failed</constant> state, or an equivalent command. This behaviour is altered if this option is set to
886 <option>inactive-or-failed</option>: in this case the unit is unloaded even if the unit is in a
887 <constant>failed</constant> state, and thus an explicitly resetting of the <constant>failed</constant> state is
888 not necessary. Note that if this mode is used unit results (such as exit codes, exit signals, consumed
889 resources, …) are flushed out immediately after the unit completed, except for what is stored in the logging
890 subsystem. Defaults to <option>inactive</option>.</para>
891 </listitem>
892 </varlistentry>
893
894 <varlistentry>
895 <term><varname>FailureAction=</varname></term>
896 <term><varname>SuccessAction=</varname></term>
897
898 <listitem><para>Configure the action to take when the unit stops and enters a failed state or inactive state.
899 Takes one of <option>none</option>, <option>reboot</option>, <option>reboot-force</option>,
900 <option>reboot-immediate</option>, <option>poweroff</option>, <option>poweroff-force</option>,
901 <option>poweroff-immediate</option>, <option>exit</option>, and <option>exit-force</option>. In system mode,
902 all options are allowed. In user mode, only <option>none</option>, <option>exit</option>, and
903 <option>exit-force</option> are allowed. Both options default to <option>none</option>.</para>
904
905 <para>If <option>none</option> is set, no action will be triggered. <option>reboot</option> causes a reboot
906 following the normal shutdown procedure (i.e. equivalent to <command>systemctl reboot</command>).
907 <option>reboot-force</option> causes a forced reboot which will terminate all processes forcibly but should
908 cause no dirty file systems on reboot (i.e. equivalent to <command>systemctl reboot -f</command>) and
909 <option>reboot-immediate</option> causes immediate execution of the
910 <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry> system call, which
911 might result in data loss (i.e. equivalent to <command>systemctl reboot -ff</command>). Similarly,
912 <option>poweroff</option>, <option>poweroff-force</option>, <option>poweroff-immediate</option> have the effect
913 of powering down the system with similar semantics. <option>exit</option> causes the manager to exit following
914 the normal shutdown procedure, and <option>exit-force</option> causes it terminate without shutting down
915 services. When <option>exit</option> or <option>exit-force</option> is used by default the exit status of the
916 main process of the unit (if this applies) is returned from the service manager. However, this may be overridden
917 with <varname>FailureActionExitStatus=</varname>/<varname>SuccessActionExitStatus=</varname>, see
918 below.</para></listitem>
919 </varlistentry>
920
921 <varlistentry>
922 <term><varname>FailureActionExitStatus=</varname></term>
923 <term><varname>SuccessActionExitStatus=</varname></term>
924
925 <listitem><para>Controls the exit status to propagate back to an invoking container manager (in case of a
926 system service) or service manager (in case of a user manager) when the
927 <varname>FailureAction=</varname>/<varname>SuccessAction=</varname> are set to <option>exit</option> or
928 <option>exit-force</option> and the action is triggered. By default the exit status of the main process of the
929 triggering unit (if this applies) is propagated. Takes a value in the range 0255 or the empty string to
930 request default behaviour.</para></listitem>
931 </varlistentry>
932
933 <varlistentry>
934 <term><varname>JobTimeoutSec=</varname></term>
935 <term><varname>JobRunningTimeoutSec=</varname></term>
936
937 <listitem><para>When a job for this unit is queued, a timeout <varname>JobTimeoutSec=</varname> may be
938 configured. Similarly, <varname>JobRunningTimeoutSec=</varname> starts counting when the queued job is actually
939 started. If either time limit is reached, the job will be cancelled, the unit however will not change state or
940 even enter the <literal>failed</literal> mode. This value defaults to <literal>infinity</literal> (job timeouts
941 disabled), except for device units (<varname>JobRunningTimeoutSec=</varname> defaults to
942 <varname>DefaultTimeoutStartSec=</varname>). NB: this timeout is independent from any unit-specific timeout
943 (for example, the timeout set with <varname>TimeoutStartSec=</varname> in service units) as the job timeout has
944 no effect on the unit itself, only on the job that might be pending for it. Or in other words: unit-specific
945 timeouts are useful to abort unit state changes, and revert them. The job timeout set with this option however
946 is useful to abort only the job waiting for the unit state to change.</para>
947 </listitem>
948 </varlistentry>
949
950 <varlistentry>
951 <term><varname>JobTimeoutAction=</varname></term>
952 <term><varname>JobTimeoutRebootArgument=</varname></term>
953
954 <listitem><para><varname>JobTimeoutAction=</varname> optionally configures an additional action to take when
955 the timeout is hit, see description of <varname>JobTimeoutSec=</varname> and
956 <varname>JobRunningTimeoutSec=</varname> above. It takes the same values as
957 <varname>StartLimitAction=</varname>. Defaults to <option>none</option>.
958 <varname>JobTimeoutRebootArgument=</varname> configures an optional reboot string to pass to the
959 <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry> system call.
960 </para></listitem>
961 </varlistentry>
962
963 <varlistentry>
964 <term><varname>StartLimitIntervalSec=<replaceable>interval</replaceable></varname></term>
965 <term><varname>StartLimitBurst=<replaceable>burst</replaceable></varname></term>
966
967 <listitem><para>Configure unit start rate limiting. Units which are started more than
968 <replaceable>burst</replaceable> times within an <replaceable>interval</replaceable> time interval are not
969 permitted to start any more. Use <varname>StartLimitIntervalSec=</varname> to configure the checking interval
970 (defaults to <varname>DefaultStartLimitIntervalSec=</varname> in manager configuration file, set it to 0 to
971 disable any kind of rate limiting). Use <varname>StartLimitBurst=</varname> to configure how many starts per
972 interval are allowed (defaults to <varname>DefaultStartLimitBurst=</varname> in manager configuration
973 file). These configuration options are particularly useful in conjunction with the service setting
974 <varname>Restart=</varname> (see
975 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>); however,
976 they apply to all kinds of starts (including manual), not just those triggered by the
977 <varname>Restart=</varname> logic. Note that units which are configured for <varname>Restart=</varname> and
978 which reach the start limit are not attempted to be restarted anymore; however, they may still be restarted
979 manually at a later point, after the <replaceable>interval</replaceable> has passed. From this point on, the
980 restart logic is activated again. Note that <command>systemctl reset-failed</command> will cause the restart
981 rate counter for a service to be flushed, which is useful if the administrator wants to manually start a unit
982 and the start limit interferes with that. Note that this rate-limiting is enforced after any unit condition
983 checks are executed, and hence unit activations with failing conditions do not count towards this rate
984 limit. This setting does not apply to slice, target, device, and scope units, since they are unit types whose
985 activation may either never fail, or may succeed only a single time.</para>
986
987 <para>When a unit is unloaded due to the garbage collection logic (see above) its rate limit counters are
988 flushed out too. This means that configuring start rate limiting for a unit that is not referenced continuously
989 has no effect.</para></listitem>
990 </varlistentry>
991
992 <varlistentry>
993 <term><varname>StartLimitAction=</varname></term>
994
995 <listitem><para>Configure an additional action to take if the rate limit configured with
996 <varname>StartLimitIntervalSec=</varname> and <varname>StartLimitBurst=</varname> is hit. Takes the same
997 values as the setting <varname>FailureAction=</varname>/<varname>SuccessAction=</varname> settings and executes
998 the same actions. If <option>none</option> is set, hitting the rate limit will trigger no action besides that
999 the start will not be permitted. Defaults to <option>none</option>.</para></listitem>
1000 </varlistentry>
1001
1002 <varlistentry>
1003 <term><varname>RebootArgument=</varname></term>
1004 <listitem><para>Configure the optional argument for the
1005 <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry> system call if
1006 <varname>StartLimitAction=</varname> or <varname>FailureAction=</varname> is a reboot action. This
1007 works just like the optional argument to <command>systemctl reboot</command> command.</para></listitem>
1008 </varlistentry>
1009
1010 <varlistentry>
1011 <term><varname>SourcePath=</varname></term>
1012 <listitem><para>A path to a configuration file this unit has
1013 been generated from. This is primarily useful for
1014 implementation of generator tools that convert configuration
1015 from an external configuration file format into native unit
1016 files. This functionality should not be used in normal
1017 units.</para></listitem>
1018 </varlistentry>
1019 </variablelist>
1020
1021 <refsect2>
1022 <title>Conditions and Asserts</title>
1023
1024 <para>Unit files may also include a number of <varname noindex="true">Condition…=</varname> and
1025 <varname noindex="true">Assert…=</varname> settings. Before the unit is started, systemd will verify
1026 that the specified conditions are true. If not, the starting of the unit will be (mostly silently)
1027 skipped. Failing conditions will not result in the unit being moved into the <literal>failed</literal>
1028 state. The conditions are checked at the time the queued start job is to be executed. The ordering
1029 dependencies are still respected, so other units are still pulled in and ordered as if this unit was
1030 successfully activated. Use condition expressions in order to skip units that do not apply to the local
1031 system, for example because the kernel or runtime environment doesn't require their functionality.
1032 </para>
1033
1034 <para>If multiple conditions are specified, the unit will be executed if all of them apply (i.e. a
1035 logical AND is applied). Condition checks can use a pipe symbol (<literal>|</literal>) after the equals
1036 sign (<literal>Condition…=|…</literal>), which causes the condition becomes a triggering condition. If
1037 at least one triggering condition is defined for a unit, then the unit will be executed if at least one
1038 of the triggering conditions apply and all of the non-triggering conditions. If you prefix an argument
1039 with the pipe symbol and an exclamation mark, the pipe symbol must be passed first, the exclamation
1040 second. If any of these options is assigned the empty string, the list of conditions is reset
1041 completely, all previous condition settings (of any kind) will have no effect.</para>
1042
1043 <para>The <varname>AssertArchitecture=</varname>, <varname>AssertVirtualization=</varname>, … options
1044 provide a similar mechanism that causes the job to fail (instead of being skipped). The failed check is
1045 logged. Units with failed conditions are considered to be in a clean state and will be garbage
1046 collected if they are not referenced. This means that when queried, the condition failure may or may
1047 not show up in the state of the unit.</para>
1048
1049 <para>Note that neither assertion nor condition expressions result in unit state changes. Also note
1050 that both are checked at the time the job is to be executed, i.e. long after depending jobs and it
1051 itself were queued. Thus, neither condition nor assertion expressions are suitable for conditionalizing
1052 unit dependencies.</para>
1053
1054 <para>The <command>condition</command> verb of
1055 <citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry> can
1056 be used to test condition and assert expressions.</para>
1057
1058 <para>Except for <varname>ConditionPathIsSymbolicLink=</varname>, all path checks follow symlinks.</para>
1059
1060 <variablelist class='unit-directives'>
1061 <!-- We do not document ConditionNull= here, as it is not particularly useful and probably just
1062 confusing. -->
1063
1064 <varlistentry>
1065 <term><varname>ConditionArchitecture=</varname></term>
1066
1067 <listitem><para>Check whether the system is running on a specific architecture. Takes one of
1068 <literal>x86</literal>,
1069 <literal>x86-64</literal>,
1070 <literal>ppc</literal>,
1071 <literal>ppc-le</literal>,
1072 <literal>ppc64</literal>,
1073 <literal>ppc64-le</literal>,
1074 <literal>ia64</literal>,
1075 <literal>parisc</literal>,
1076 <literal>parisc64</literal>,
1077 <literal>s390</literal>,
1078 <literal>s390x</literal>,
1079 <literal>sparc</literal>,
1080 <literal>sparc64</literal>,
1081 <literal>mips</literal>,
1082 <literal>mips-le</literal>,
1083 <literal>mips64</literal>,
1084 <literal>mips64-le</literal>,
1085 <literal>alpha</literal>,
1086 <literal>arm</literal>,
1087 <literal>arm-be</literal>,
1088 <literal>arm64</literal>,
1089 <literal>arm64-be</literal>,
1090 <literal>sh</literal>,
1091 <literal>sh64</literal>,
1092 <literal>m68k</literal>,
1093 <literal>tilegx</literal>,
1094 <literal>cris</literal>,
1095 <literal>arc</literal>,
1096 <literal>arc-be</literal>, or
1097 <literal>native</literal>.</para>
1098
1099 <para>The architecture is determined from the information returned by
1100 <citerefentry project='man-pages'><refentrytitle>uname</refentrytitle><manvolnum>2</manvolnum></citerefentry>
1101 and is thus subject to
1102 <citerefentry><refentrytitle>personality</refentrytitle><manvolnum>2</manvolnum></citerefentry>.
1103 Note that a <varname>Personality=</varname> setting in the same unit file has no effect on this
1104 condition. A special architecture name <literal>native</literal> is mapped to the architecture the
1105 system manager itself is compiled for. The test may be negated by prepending an exclamation
1106 mark.</para>
1107 </listitem>
1108 </varlistentry>
1109
1110 <varlistentry>
1111 <term><varname>ConditionArchitecture=</varname></term>
1112
1113 <listitem><para>Check whether the system is executed in a virtualized environment and optionally
1114 test whether it is a specific implementation. Takes either boolean value to check if being executed
1115 in any virtualized environment, or one of
1116 <literal>vm</literal> and
1117 <literal>container</literal> to test against a generic type of virtualization solution, or one of
1118 <literal>qemu</literal>,
1119 <literal>kvm</literal>,
1120 <literal>zvm</literal>,
1121 <literal>vmware</literal>,
1122 <literal>microsoft</literal>,
1123 <literal>oracle</literal>,
1124 <literal>xen</literal>,
1125 <literal>bochs</literal>,
1126 <literal>uml</literal>,
1127 <literal>bhyve</literal>,
1128 <literal>qnx</literal>,
1129 <literal>openvz</literal>,
1130 <literal>lxc</literal>,
1131 <literal>lxc-libvirt</literal>,
1132 <literal>systemd-nspawn</literal>,
1133 <literal>docker</literal>,
1134 <literal>podman</literal>,
1135 <literal>rkt</literal>,
1136 <literal>wsl</literal>,
1137 <literal>acrn</literal> to test
1138 against a specific implementation, or
1139 <literal>private-users</literal> to check whether we are running in a user namespace. See
1140 <citerefentry><refentrytitle>systemd-detect-virt</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1141 for a full list of known virtualization technologies and their identifiers. If multiple
1142 virtualization technologies are nested, only the innermost is considered. The test may be negated
1143 by prepending an exclamation mark.</para>
1144 </listitem>
1145 </varlistentry>
1146
1147 <varlistentry>
1148 <term><varname>ConditionHost=</varname></term>
1149
1150 <listitem><para><varname>ConditionHost=</varname> may be used to match against the hostname or
1151 machine ID of the host. This either takes a hostname string (optionally with shell style globs)
1152 which is tested against the locally set hostname as returned by
1153 <citerefentry><refentrytitle>gethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>, or
1154 a machine ID formatted as string (see
1155 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
1156 The test may be negated by prepending an exclamation mark.</para>
1157 </listitem>
1158 </varlistentry>
1159
1160 <varlistentry>
1161 <term><varname>ConditionKernelCommandLine=</varname></term>
1162
1163 <listitem><para><varname>ConditionKernelCommandLine=</varname> may be used to check whether a
1164 specific kernel command line option is set (or if prefixed with the exclamation mark — unset). The
1165 argument must either be a single word, or an assignment (i.e. two words, separated by
1166 <literal>=</literal>). In the former case the kernel command line is searched for the word
1167 appearing as is, or as left hand side of an assignment. In the latter case, the exact assignment is
1168 looked for with right and left hand side matching.</para>
1169 </listitem>
1170 </varlistentry>
1171
1172 <varlistentry>
1173 <term><varname>ConditionKernelVersion=</varname></term>
1174
1175 <listitem><para><varname>ConditionKernelVersion=</varname> may be used to check whether the kernel
1176 version (as reported by <command>uname -r</command>) matches a certain expression (or if prefixed
1177 with the exclamation mark does not match it). The argument must be a list of (potentially quoted)
1178 expressions. For each of the expressions, if it starts with one of <literal>&lt;</literal>,
1179 <literal>&lt;=</literal>, <literal>=</literal>, <literal>!=</literal>, <literal>&gt;=</literal>,
1180 <literal>&gt;</literal> a relative version comparison is done, otherwise the specified string is
1181 matched with shell-style globs.</para>
1182
1183 <para>Note that using the kernel version string is an unreliable way to determine which features
1184 are supported by a kernel, because of the widespread practice of backporting drivers, features, and
1185 fixes from newer upstream kernels into older versions provided by distributions. Hence, this check
1186 is inherently unportable and should not be used for units which may be used on different
1187 distributions.</para>
1188 </listitem>
1189 </varlistentry>
1190
1191 <varlistentry>
1192 <term><varname>ConditionSecurity=</varname></term>
1193
1194 <listitem><para><varname>ConditionSecurity=</varname> may be used to check whether the given
1195 security technology is enabled on the system. Currently, the recognized values are
1196 <literal>selinux</literal>, <literal>apparmor</literal>, <literal>tomoyo</literal>,
1197 <literal>ima</literal>, <literal>smack</literal>, <literal>audit</literal> and
1198 <literal>uefi-secureboot</literal>. The test may be negated by prepending an exclamation
1199 mark.</para>
1200 </listitem>
1201 </varlistentry>
1202
1203 <varlistentry>
1204 <term><varname>ConditionCapability=</varname></term>
1205
1206 <listitem><para>Check whether the given capability exists in the capability bounding set of the
1207 service manager (i.e. this does not check whether capability is actually available in the permitted
1208 or effective sets, see
1209 <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
1210 for details). Pass a capability name such as <literal>CAP_MKNOD</literal>, possibly prefixed with
1211 an exclamation mark to negate the check.</para>
1212 </listitem>
1213 </varlistentry>
1214
1215 <varlistentry>
1216 <term><varname>ConditionACPower=</varname></term>
1217
1218 <listitem><para>Check whether the system has AC power, or is exclusively battery powered at the
1219 time of activation of the unit. This takes a boolean argument. If set to <literal>true</literal>,
1220 the condition will hold only if at least one AC connector of the system is connected to a power
1221 source, or if no AC connectors are known. Conversely, if set to <literal>false</literal>, the
1222 condition will hold only if there is at least one AC connector known and all AC connectors are
1223 disconnected from a power source.</para>
1224 </listitem>
1225 </varlistentry>
1226
1227 <varlistentry>
1228 <term><varname>ConditionNeedsUpdate=</varname></term>
1229
1230 <listitem><para>Takes one of <filename>/var</filename> or <filename>/etc</filename> as argument,
1231 possibly prefixed with a <literal>!</literal> (to inverting the condition). This condition may be
1232 used to conditionalize units on whether the specified directory requires an update because
1233 <filename>/usr</filename>'s modification time is newer than the stamp file
1234 <filename>.updated</filename> in the specified directory. This is useful to implement offline
1235 updates of the vendor operating system resources in <filename>/usr</filename> that require updating
1236 of <filename>/etc</filename> or <filename>/var</filename> on the next following boot. Units making
1237 use of this condition should order themselves before
1238 <citerefentry><refentrytitle>systemd-update-done.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1239 to make sure they run before the stamp file's modification time gets reset indicating a completed
1240 update.</para>
1241 </listitem>
1242 </varlistentry>
1243
1244 <varlistentry>
1245 <term><varname>ConditionFirstBoot=</varname></term>
1246
1247 <listitem><para>Takes a boolean argument. This condition may be used to conditionalize units on
1248 whether the system is booting up with an unpopulated <filename>/etc</filename> directory
1249 (specifically: an <filename>/etc</filename> with no <filename>/etc/machine-id</filename>). This may
1250 be used to populate <filename>/etc</filename> on the first boot after factory reset, or when a new
1251 system instance boots up for the first time.</para>
1252 </listitem>
1253 </varlistentry>
1254
1255 <varlistentry>
1256 <term><varname>ConditionPathExists=</varname></term>
1257
1258 <listitem><para>Check for the exists of a file. If the specified absolute path name does not exist,
1259 the condition will fail. If the absolute path name passed to
1260 <varname>ConditionPathExists=</varname> is prefixed with an exclamation mark
1261 (<literal>!</literal>), the test is negated, and the unit is only started if the path does not
1262 exist.</para>
1263 </listitem>
1264 </varlistentry>
1265
1266 <varlistentry>
1267 <term><varname>ConditionPathExistsGlob=</varname></term>
1268
1269 <listitem><para><varname>ConditionPathExistsGlob=</varname> is similar to
1270 <varname>ConditionPathExists=</varname>, but checks for the existence of at least one file or
1271 directory matching the specified globbing pattern.</para>
1272 </listitem>
1273 </varlistentry>
1274
1275 <varlistentry>
1276 <term><varname>ConditionPathIsDirectory=</varname></term>
1277
1278 <listitem><para><varname>ConditionPathIsDirectory=</varname> is similar to
1279 <varname>ConditionPathExists=</varname> but verifies that a certain path exists and is a
1280 directory.</para>
1281 </listitem>
1282 </varlistentry>
1283
1284 <varlistentry>
1285 <term><varname>ConditionPathIsSymbolicLink=</varname></term>
1286
1287 <listitem><para><varname>ConditionPathIsSymbolicLink=</varname> is similar to
1288 <varname>ConditionPathExists=</varname> but verifies that a certain path exists and is a symbolic
1289 link.</para>
1290 </listitem>
1291 </varlistentry>
1292
1293 <varlistentry>
1294 <term><varname>ConditionPathIsMountPoint=</varname></term>
1295
1296 <listitem><para><varname>ConditionPathIsMountPoint=</varname> is similar to
1297 <varname>ConditionPathExists=</varname> but verifies that a certain path exists and is a mount
1298 point.</para>
1299 </listitem>
1300 </varlistentry>
1301
1302 <varlistentry>
1303 <term><varname>ConditionPathIsReadWrite=</varname></term>
1304
1305 <listitem><para><varname>ConditionPathIsReadWrite=</varname> is similar to
1306 <varname>ConditionPathExists=</varname> but verifies that the underlying file system is readable
1307 and writable (i.e. not mounted read-only).</para>
1308 </listitem>
1309 </varlistentry>
1310
1311 <varlistentry>
1312 <term><varname>ConditionDirectoryNotEmpty=</varname></term>
1313
1314 <listitem><para><varname>ConditionDirectoryNotEmpty=</varname> is similar to
1315 <varname>ConditionPathExists=</varname> but verifies that a certain path exists and is a non-empty
1316 directory.</para>
1317 </listitem>
1318 </varlistentry>
1319
1320 <varlistentry>
1321 <term><varname>ConditionFileNotEmpty=</varname></term>
1322
1323 <listitem><para><varname>ConditionFileNotEmpty=</varname> is similar to
1324 <varname>ConditionPathExists=</varname> but verifies that a certain path exists and refers to a
1325 regular file with a non-zero size.</para>
1326 </listitem>
1327 </varlistentry>
1328
1329 <varlistentry>
1330 <term><varname>ConditionFileIsExecutable=</varname></term>
1331
1332 <listitem><para><varname>ConditionFileIsExecutable=</varname> is similar to
1333 <varname>ConditionPathExists=</varname> but verifies that a certain path exists, is a regular file,
1334 and marked executable.</para>
1335 </listitem>
1336 </varlistentry>
1337
1338 <varlistentry>
1339 <term><varname>ConditionUser=</varname></term>
1340
1341 <listitem><para><varname>ConditionUser=</varname> takes a numeric <literal>UID</literal>, a UNIX
1342 user name, or the special value <literal>@system</literal>. This condition may be used to check
1343 whether the service manager is running as the given user. The special value
1344 <literal>@system</literal> can be used to check if the user id is within the system user
1345 range. This option is not useful for system services, as the system manager exclusively runs as the
1346 root user, and thus the test result is constant.</para>
1347 </listitem>
1348 </varlistentry>
1349
1350 <varlistentry>
1351 <term><varname>ConditionGroup=</varname></term>
1352
1353 <listitem><para><varname>ConditionGroup=</varname> is similar to <varname>ConditionUser=</varname>
1354 but verifies that the service manager's real or effective group, or any of its auxiliary groups,
1355 match the specified group or GID. This setting does not support the special value
1356 <literal>@system</literal>.</para>
1357 </listitem>
1358 </varlistentry>
1359
1360 <varlistentry>
1361 <term><varname>ConditionControlGroupController=</varname></term>
1362
1363 <listitem><para>Verify that the given cgroup controller (eg. <literal>cpu</literal>) is available
1364 for use on the system. For example, a particular controller may not be available if it was disabled
1365 on the kernel command line with <varname>cgroup_disable=controller</varname>. Multiple controllers
1366 may be passed with a space separating them; in this case the condition will only pass if all listed
1367 controllers are available for use. Controllers unknown to systemd are ignored. Valid controllers
1368 are <literal>cpu</literal>, <literal>cpuacct</literal>, <literal>io</literal>,
1369 <literal>blkio</literal>, <literal>memory</literal>, <literal>devices</literal>, and
1370 <literal>pids</literal>.</para>
1371 </listitem>
1372 </varlistentry>
1373
1374 <varlistentry>
1375 <term><varname>ConditionMemory=</varname></term>
1376
1377 <listitem><para>Verify that the specified amount of system memory is available to the current
1378 system. Takes a memory size in bytes as argument, optionally prefixed with a comparison operator
1379 <literal>&lt;</literal>, <literal>&lt;=</literal>, <literal>=</literal>, <literal>!=</literal>,
1380 <literal>&gt;=</literal>, <literal>&gt;</literal>. On bare-metal systems compares the amount of
1381 physical memory in the system with the specified size, adhering to the specified comparison
1382 operator. In containers compares the amount of memory assigned to the container instead.</para>
1383 </listitem>
1384 </varlistentry>
1385
1386 <varlistentry>
1387 <term><varname>ConditionCPUs=</varname></term>
1388
1389 <listitem><para>Verify that the specified number of CPUs is available to the current system. Takes
1390 a number of CPUs as argument, optionally prefixed with a comparison operator
1391 <literal>&lt;</literal>, <literal>&lt;=</literal>, <literal>=</literal>, <literal>!=</literal>,
1392 <literal>&gt;=</literal>, <literal>&gt;</literal>. Compares the number of CPUs in the CPU affinity
1393 mask configured of the service manager itself with the specified number, adhering to the specified
1394 comparison operator. On physical systems the number of CPUs in the affinity mask of the service
1395 manager usually matches the number of physical CPUs, but in special and virtual environments might
1396 differ. In particular, in containers the affinity mask usually matches the number of CPUs assigned
1397 to the container and not the physically available ones.</para></listitem>
1398 </varlistentry>
1399
1400 <varlistentry>
1401 <term><varname>AssertArchitecture=</varname></term>
1402 <term><varname>AssertVirtualization=</varname></term>
1403 <term><varname>AssertHost=</varname></term>
1404 <term><varname>AssertKernelCommandLine=</varname></term>
1405 <term><varname>AssertKernelVersion=</varname></term>
1406 <term><varname>AssertSecurity=</varname></term>
1407 <term><varname>AssertCapability=</varname></term>
1408 <term><varname>AssertACPower=</varname></term>
1409 <term><varname>AssertNeedsUpdate=</varname></term>
1410 <term><varname>AssertFirstBoot=</varname></term>
1411 <term><varname>AssertPathExists=</varname></term>
1412 <term><varname>AssertPathExistsGlob=</varname></term>
1413 <term><varname>AssertPathIsDirectory=</varname></term>
1414 <term><varname>AssertPathIsSymbolicLink=</varname></term>
1415 <term><varname>AssertPathIsMountPoint=</varname></term>
1416 <term><varname>AssertPathIsReadWrite=</varname></term>
1417 <term><varname>AssertDirectoryNotEmpty=</varname></term>
1418 <term><varname>AssertFileNotEmpty=</varname></term>
1419 <term><varname>AssertFileIsExecutable=</varname></term>
1420 <term><varname>AssertUser=</varname></term>
1421 <term><varname>AssertGroup=</varname></term>
1422 <term><varname>AssertControlGroupController=</varname></term>
1423
1424 <listitem><para>Similar to the <varname>ConditionArchitecture=</varname>,
1425 <varname>ConditionVirtualization=</varname>, …, condition settings described above, these settings
1426 add assertion checks to the start-up of the unit. However, unlike the conditions settings, any
1427 assertion setting that is not met results in failure of the start job (which means this is logged
1428 loudly). Note that hitting a configured assertion does not cause the unit to enter the
1429 <literal>failed</literal> state (or in fact result in any state change of the unit), it affects
1430 only the job queued for it. Use assertion expressions for units that cannot operate when specific
1431 requirements are not met, and when this is something the administrator or user should look
1432 into.</para>
1433 </listitem>
1434 </varlistentry>
1435 </variablelist>
1436 </refsect2>
1437 </refsect1>
1438
1439 <refsect1>
1440 <title>Mapping of unit properties to their inverses</title>
1441
1442 <para>Unit settings that create a relationship with a second unit usually show up
1443 in properties of both units, for example in <command>systemctl show</command>
1444 output. In some cases the name of the property is the same as the name of the
1445 configuration setting, but not always. This table lists the properties
1446 that are shown on two units which are connected through some dependency, and shows
1447 which property on "source" unit corresponds to which property on the "target" unit.
1448 </para>
1449
1450 <table>
1451 <title>
1452 "Forward" and "reverse" unit properties
1453 </title>
1454
1455 <tgroup cols='4'>
1456 <colspec colname='forward' />
1457 <colspec colname='reverse' />
1458 <colspec colname='fuse' />
1459 <colspec colname='ruse' />
1460 <thead>
1461 <row>
1462 <entry>"Forward" property</entry>
1463 <entry>"Reverse" property</entry>
1464 <entry namest='fuse' nameend='ruse' valign='middle'>Where used</entry>
1465 </row>
1466 </thead>
1467 <tbody>
1468 <row>
1469 <entry><varname>Before=</varname></entry>
1470 <entry><varname>After=</varname></entry>
1471 <entry morerows='1' namest='fuse' nameend='ruse' valign='middle'>[Unit] section</entry>
1472 </row>
1473 <row>
1474 <entry><varname>After=</varname></entry>
1475 <entry><varname>Before=</varname></entry>
1476 </row>
1477 <row>
1478 <entry><varname>Requires=</varname></entry>
1479 <entry><varname>RequiredBy=</varname></entry>
1480 <entry>[Unit] section</entry>
1481 <entry>[Install] section</entry>
1482 </row>
1483 <row>
1484 <entry><varname>Wants=</varname></entry>
1485 <entry><varname>WantedBy=</varname></entry>
1486 <entry>[Unit] section</entry>
1487 <entry>[Install] section</entry>
1488 </row>
1489 <row>
1490 <entry><varname>PartOf=</varname></entry>
1491 <entry><varname>ConsistsOf=</varname></entry>
1492 <entry>[Unit] section</entry>
1493 <entry>an automatic property</entry>
1494 </row>
1495 <row>
1496 <entry><varname>BindsTo=</varname></entry>
1497 <entry><varname>BoundBy=</varname></entry>
1498 <entry>[Unit] section</entry>
1499 <entry>an automatic property</entry>
1500 </row>
1501 <row>
1502 <entry><varname>Requisite=</varname></entry>
1503 <entry><varname>RequisiteOf=</varname></entry>
1504 <entry>[Unit] section</entry>
1505 <entry>an automatic property</entry>
1506 </row>
1507 <row>
1508 <entry><varname>Triggers=</varname></entry>
1509 <entry><varname>TriggeredBy=</varname></entry>
1510 <entry namest='fuse' nameend='ruse' valign='middle'>Automatic properties, see notes below</entry>
1511 </row>
1512 <row>
1513 <entry><varname>Conflicts=</varname></entry>
1514 <entry><varname>ConflictedBy=</varname></entry>
1515 <entry>[Unit] section</entry>
1516 <entry>an automatic property</entry>
1517 </row>
1518 <row>
1519 <entry><varname>PropagatesReloadTo=</varname></entry>
1520 <entry><varname>ReloadPropagatedFrom=</varname></entry>
1521 <entry morerows='1' namest='fuse' nameend='ruse' valign='middle'>[Unit] section</entry>
1522 </row>
1523 <row>
1524 <entry><varname>ReloadPropagatedFrom=</varname></entry>
1525 <entry><varname>PropagatesReloadTo=</varname></entry>
1526 </row>
1527 <row>
1528 <entry><varname>Following=</varname></entry>
1529 <entry>n/a</entry>
1530 <entry>An automatic property</entry>
1531 </row>
1532 </tbody>
1533 </tgroup>
1534 </table>
1535
1536 <para>Note: <varname>WantedBy=</varname> and <varname>RequiredBy=</varname> are
1537 used in the [Install] section to create symlinks in <filename>.wants/</filename>
1538 and <filename>.requires/</filename> directories. They cannot be used directly as a
1539 unit configuration setting.</para>
1540
1541 <para>Note: <varname>ConsistsOf=</varname>, <varname>BoundBy=</varname>,
1542 <varname>RequisiteOf=</varname>, <varname>ConflictedBy=</varname> are created
1543 implicitly along with their reverse and cannot be specified directly.</para>
1544
1545 <para>Note: <varname>Triggers=</varname> is created implicitly between a socket,
1546 path unit, or an automount unit, and the unit they activate. By default a unit
1547 with the same name is triggered, but this can be overridden using
1548 <varname>Sockets=</varname>, <varname>Service=</varname>, and <varname>Unit=</varname>
1549 settings. See
1550 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1551 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1552 <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1553 and
1554 <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1555 for details. <varname>TriggersBy=</varname> is created implicitly on the
1556 triggered unit.</para>
1557
1558 <para>Note: <varname>Following=</varname> is used to group device aliases and points to the
1559 "primary" device unit that systemd is using to track device state, usually corresponding to a
1560 sysfs path. It does not show up in the "target" unit.</para>
1561 </refsect1>
1562
1563 <refsect1>
1564 <title>[Install] Section Options</title>
1565
1566 <para>Unit files may include an <literal>[Install]</literal> section, which carries installation information for
1567 the unit. This section is not interpreted by
1568 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> during runtime; it is
1569 used by the <command>enable</command> and <command>disable</command> commands of the
1570 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> tool during
1571 installation of a unit.</para>
1572
1573 <variablelist class='unit-directives'>
1574 <varlistentry>
1575 <term><varname>Alias=</varname></term>
1576
1577 <listitem><para>A space-separated list of additional names this unit shall be installed under. The names listed
1578 here must have the same suffix (i.e. type) as the unit filename. This option may be specified more than once,
1579 in which case all listed names are used. At installation time, <command>systemctl enable</command> will create
1580 symlinks from these names to the unit filename. Note that not all unit types support such alias names, and this
1581 setting is not supported for them. Specifically, mount, slice, swap, and automount units do not support
1582 aliasing.</para></listitem>
1583 </varlistentry>
1584
1585 <varlistentry>
1586 <term><varname>WantedBy=</varname></term>
1587 <term><varname>RequiredBy=</varname></term>
1588
1589 <listitem><para>This option may be used more than once, or a
1590 space-separated list of unit names may be given. A symbolic
1591 link is created in the <filename>.wants/</filename> or
1592 <filename>.requires/</filename> directory of each of the
1593 listed units when this unit is installed by <command>systemctl
1594 enable</command>. This has the effect that a dependency of
1595 type <varname>Wants=</varname> or <varname>Requires=</varname>
1596 is added from the listed unit to the current unit. The primary
1597 result is that the current unit will be started when the
1598 listed unit is started. See the description of
1599 <varname>Wants=</varname> and <varname>Requires=</varname> in
1600 the [Unit] section for details.</para>
1601
1602 <para><command>WantedBy=foo.service</command> in a service
1603 <filename>bar.service</filename> is mostly equivalent to
1604 <command>Alias=foo.service.wants/bar.service</command> in the
1605 same file. In case of template units, <command>systemctl
1606 enable</command> must be called with an instance name, and
1607 this instance will be added to the
1608 <filename>.wants/</filename> or
1609 <filename>.requires/</filename> list of the listed unit. E.g.
1610 <command>WantedBy=getty.target</command> in a service
1611 <filename>getty@.service</filename> will result in
1612 <command>systemctl enable getty@tty2.service</command>
1613 creating a
1614 <filename>getty.target.wants/getty@tty2.service</filename>
1615 link to <filename>getty@.service</filename>.
1616 </para></listitem>
1617 </varlistentry>
1618
1619 <varlistentry>
1620 <term><varname>Also=</varname></term>
1621
1622 <listitem><para>Additional units to install/deinstall when
1623 this unit is installed/deinstalled. If the user requests
1624 installation/deinstallation of a unit with this option
1625 configured, <command>systemctl enable</command> and
1626 <command>systemctl disable</command> will automatically
1627 install/uninstall units listed in this option as well.</para>
1628
1629 <para>This option may be used more than once, or a
1630 space-separated list of unit names may be
1631 given.</para></listitem>
1632 </varlistentry>
1633
1634 <varlistentry>
1635 <term><varname>DefaultInstance=</varname></term>
1636
1637 <listitem><para>In template unit files, this specifies for
1638 which instance the unit shall be enabled if the template is
1639 enabled without any explicitly set instance. This option has
1640 no effect in non-template unit files. The specified string
1641 must be usable as instance identifier.</para></listitem>
1642 </varlistentry>
1643 </variablelist>
1644
1645 <para>The following specifiers are interpreted in the Install
1646 section: %n, %N, %p, %i, %j, %g, %G, %U, %u, %m, %H, %b, %v. For their
1647 meaning see the next section.
1648 </para>
1649 </refsect1>
1650
1651 <refsect1>
1652 <title>Specifiers</title>
1653
1654 <para>Many settings resolve specifiers which may be used to write
1655 generic unit files referring to runtime or unit parameters that
1656 are replaced when the unit files are loaded. Specifiers must be known
1657 and resolvable for the setting to be valid. The following
1658 specifiers are understood:</para>
1659
1660 <table>
1661 <title>Specifiers available in unit files</title>
1662 <tgroup cols='3' align='left' colsep='1' rowsep='1'>
1663 <colspec colname="spec" />
1664 <colspec colname="mean" />
1665 <colspec colname="detail" />
1666 <thead>
1667 <row>
1668 <entry>Specifier</entry>
1669 <entry>Meaning</entry>
1670 <entry>Details</entry>
1671 </row>
1672 </thead>
1673 <tbody>
1674 <row>
1675 <entry><literal>%b</literal></entry>
1676 <entry>Boot ID</entry>
1677 <entry>The boot ID of the running system, formatted as string. See <citerefentry><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry> for more information.</entry>
1678 </row>
1679 <row>
1680 <entry><literal>%C</literal></entry>
1681 <entry>Cache directory root</entry>
1682 <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>
1683 </row>
1684 <row>
1685 <entry><literal>%E</literal></entry>
1686 <entry>Configuration directory root</entry>
1687 <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>
1688 </row>
1689 <row>
1690 <entry><literal>%f</literal></entry>
1691 <entry>Unescaped filename</entry>
1692 <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>
1693 </row>
1694 <row>
1695 <entry><literal>%h</literal></entry>
1696 <entry>User home directory</entry>
1697 <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>.
1698
1699 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>
1700 </row>
1701 <row>
1702 <entry><literal>%H</literal></entry>
1703 <entry>Host name</entry>
1704 <entry>The hostname of the running system at the point in time the unit configuration is loaded.</entry>
1705 </row>
1706 <row>
1707 <entry><literal>%i</literal></entry>
1708 <entry>Instance name</entry>
1709 <entry>For instantiated units this is the string between the first <literal>@</literal> character and the type suffix. Empty for non-instantiated units.</entry>
1710 </row>
1711 <row>
1712 <entry><literal>%I</literal></entry>
1713 <entry>Unescaped instance name</entry>
1714 <entry>Same as <literal>%i</literal>, but with escaping undone.</entry>
1715 </row>
1716 <row>
1717 <entry><literal>%j</literal></entry>
1718 <entry>Final component of the prefix</entry>
1719 <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>
1720 </row>
1721 <row>
1722 <entry><literal>%J</literal></entry>
1723 <entry>Unescaped final component of the prefix</entry>
1724 <entry>Same as <literal>%j</literal>, but with escaping undone.</entry>
1725 </row>
1726 <row>
1727 <entry><literal>%L</literal></entry>
1728 <entry>Log directory root</entry>
1729 <entry>This is either <filename>/var/log</filename> (for the system manager) or the path <literal>$XDG_CONFIG_HOME</literal> resolves to with <filename noindex='true'>/log</filename> appended (for user managers).</entry>
1730 </row>
1731 <row>
1732 <entry><literal>%m</literal></entry>
1733 <entry>Machine ID</entry>
1734 <entry>The machine ID of the running system, formatted as string. See <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more information.</entry>
1735 </row>
1736 <row>
1737 <entry><literal>%n</literal></entry>
1738 <entry>Full unit name</entry>
1739 <entry></entry>
1740 </row>
1741 <row>
1742 <entry><literal>%N</literal></entry>
1743 <entry>Full unit name</entry>
1744 <entry>Same as <literal>%n</literal>, but with the type suffix removed.</entry>
1745 </row>
1746 <row>
1747 <entry><literal>%p</literal></entry>
1748 <entry>Prefix name</entry>
1749 <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>
1750 </row>
1751 <row>
1752 <entry><literal>%P</literal></entry>
1753 <entry>Unescaped prefix name</entry>
1754 <entry>Same as <literal>%p</literal>, but with escaping undone.</entry>
1755 </row>
1756 <row>
1757 <entry><literal>%s</literal></entry>
1758 <entry>User shell</entry>
1759 <entry>This is the shell of the user running the service manager instance. In case of the system manager this resolves to <literal>/bin/sh</literal>.</entry>
1760 </row>
1761 <row>
1762 <entry><literal>%S</literal></entry>
1763 <entry>State directory root</entry>
1764 <entry>This is either <filename>/var/lib</filename> (for the system manager) or the path <literal>$XDG_CONFIG_HOME</literal> resolves to (for user managers).</entry>
1765 </row>
1766 <row>
1767 <entry><literal>%t</literal></entry>
1768 <entry>Runtime directory root</entry>
1769 <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>
1770 </row>
1771 <row>
1772 <entry><literal>%T</literal></entry>
1773 <entry>Directory for temporary files</entry>
1774 <entry>This is either <filename>/tmp</filename> or the path <literal>$TMPDIR</literal>, <literal>$TEMP</literal> or <literal>$TMP</literal> are set to.</entry>
1775 </row>
1776 <row>
1777 <entry><literal>%g</literal></entry>
1778 <entry>User group</entry>
1779 <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>
1780 </row>
1781 <row>
1782 <entry><literal>%G</literal></entry>
1783 <entry>User GID</entry>
1784 <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>
1785 </row>
1786 <row>
1787 <entry><literal>%u</literal></entry>
1788 <entry>User name</entry>
1789 <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>.
1790
1791 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>
1792 </row>
1793 <row>
1794 <entry><literal>%U</literal></entry>
1795 <entry>User UID</entry>
1796 <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>.
1797
1798 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>
1799 </row>
1800 <row>
1801 <entry><literal>%v</literal></entry>
1802 <entry>Kernel release</entry>
1803 <entry>Identical to <command>uname -r</command> output</entry>
1804 </row>
1805 <row>
1806 <entry><literal>%V</literal></entry>
1807 <entry>Directory for larger and persistent temporary files</entry>
1808 <entry>This is either <filename>/var/tmp</filename> or the path <literal>$TMPDIR</literal>, <literal>$TEMP</literal> or <literal>$TMP</literal> are set to.</entry>
1809 </row>
1810 <row>
1811 <entry><literal>%%</literal></entry>
1812 <entry>Single percent sign</entry>
1813 <entry>Use <literal>%%</literal> in place of <literal>%</literal> to specify a single percent sign.</entry>
1814 </row>
1815 </tbody>
1816 </tgroup>
1817 </table>
1818 </refsect1>
1819
1820 <refsect1>
1821 <title>Examples</title>
1822
1823 <example>
1824 <title>Allowing units to be enabled</title>
1825
1826 <para>The following snippet (highlighted) allows a unit (e.g.
1827 <filename>foo.service</filename>) to be enabled via
1828 <command>systemctl enable</command>:</para>
1829
1830 <programlisting>[Unit]
1831 Description=Foo
1832
1833 [Service]
1834 ExecStart=/usr/sbin/foo-daemon
1835
1836 <emphasis>[Install]</emphasis>
1837 <emphasis>WantedBy=multi-user.target</emphasis></programlisting>
1838
1839 <para>After running <command>systemctl enable</command>, a
1840 symlink
1841 <filename>/etc/systemd/system/multi-user.target.wants/foo.service</filename>
1842 linking to the actual unit will be created. It tells systemd to
1843 pull in the unit when starting
1844 <filename>multi-user.target</filename>. The inverse
1845 <command>systemctl disable</command> will remove that symlink
1846 again.</para>
1847 </example>
1848
1849 <example>
1850 <title>Overriding vendor settings</title>
1851
1852 <para>There are two methods of overriding vendor settings in
1853 unit files: copying the unit file from
1854 <filename>/usr/lib/systemd/system</filename> to
1855 <filename>/etc/systemd/system</filename> and modifying the
1856 chosen settings. Alternatively, one can create a directory named
1857 <filename><replaceable>unit</replaceable>.d/</filename> within
1858 <filename>/etc/systemd/system</filename> and place a drop-in
1859 file <filename><replaceable>name</replaceable>.conf</filename>
1860 there that only changes the specific settings one is interested
1861 in. Note that multiple such drop-in files are read if
1862 present, processed in lexicographic order of their filename.</para>
1863
1864 <para>The advantage of the first method is that one easily
1865 overrides the complete unit, the vendor unit is not parsed at
1866 all anymore. It has the disadvantage that improvements to the
1867 unit file by the vendor are not automatically incorporated on
1868 updates.</para>
1869
1870 <para>The advantage of the second method is that one only
1871 overrides the settings one specifically wants, where updates to
1872 the unit by the vendor automatically apply. This has the
1873 disadvantage that some future updates by the vendor might be
1874 incompatible with the local changes.</para>
1875
1876 <para>This also applies for user instances of systemd, but with
1877 different locations for the unit files. See the section on unit
1878 load paths for further details.</para>
1879
1880 <para>Suppose there is a vendor-supplied unit
1881 <filename>/usr/lib/systemd/system/httpd.service</filename> with
1882 the following contents:</para>
1883
1884 <programlisting>[Unit]
1885 Description=Some HTTP server
1886 After=remote-fs.target sqldb.service
1887 Requires=sqldb.service
1888 AssertPathExists=/srv/webserver
1889
1890 [Service]
1891 Type=notify
1892 ExecStart=/usr/sbin/some-fancy-httpd-server
1893 Nice=5
1894
1895 [Install]
1896 WantedBy=multi-user.target</programlisting>
1897
1898 <para>Now one wants to change some settings as an administrator:
1899 firstly, in the local setup, <filename>/srv/webserver</filename>
1900 might not exist, because the HTTP server is configured to use
1901 <filename>/srv/www</filename> instead. Secondly, the local
1902 configuration makes the HTTP server also depend on a memory
1903 cache service, <filename>memcached.service</filename>, that
1904 should be pulled in (<varname>Requires=</varname>) and also be
1905 ordered appropriately (<varname>After=</varname>). Thirdly, in
1906 order to harden the service a bit more, the administrator would
1907 like to set the <varname>PrivateTmp=</varname> setting (see
1908 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1909 for details). And lastly, the administrator would like to reset
1910 the niceness of the service to its default value of 0.</para>
1911
1912 <para>The first possibility is to copy the unit file to
1913 <filename>/etc/systemd/system/httpd.service</filename> and
1914 change the chosen settings:</para>
1915
1916 <programlisting>[Unit]
1917 Description=Some HTTP server
1918 After=remote-fs.target sqldb.service <emphasis>memcached.service</emphasis>
1919 Requires=sqldb.service <emphasis>memcached.service</emphasis>
1920 AssertPathExists=<emphasis>/srv/www</emphasis>
1921
1922 [Service]
1923 Type=notify
1924 ExecStart=/usr/sbin/some-fancy-httpd-server
1925 <emphasis>Nice=0</emphasis>
1926 <emphasis>PrivateTmp=yes</emphasis>
1927
1928 [Install]
1929 WantedBy=multi-user.target</programlisting>
1930
1931 <para>Alternatively, the administrator could create a drop-in
1932 file
1933 <filename>/etc/systemd/system/httpd.service.d/local.conf</filename>
1934 with the following contents:</para>
1935
1936 <programlisting>[Unit]
1937 After=memcached.service
1938 Requires=memcached.service
1939 # Reset all assertions and then re-add the condition we want
1940 AssertPathExists=
1941 AssertPathExists=/srv/www
1942
1943 [Service]
1944 Nice=0
1945 PrivateTmp=yes</programlisting>
1946
1947 <para>Note that for drop-in files, if one wants to remove
1948 entries from a setting that is parsed as a list (and is not a
1949 dependency), such as <varname>AssertPathExists=</varname> (or
1950 e.g. <varname>ExecStart=</varname> in service units), one needs
1951 to first clear the list before re-adding all entries except the
1952 one that is to be removed. Dependencies (<varname>After=</varname>, etc.)
1953 cannot be reset to an empty list, so dependencies can only be
1954 added in drop-ins. If you want to remove dependencies, you have
1955 to override the entire unit.</para>
1956
1957 </example>
1958 </refsect1>
1959
1960 <refsect1>
1961 <title>See Also</title>
1962 <para>
1963 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1964 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1965 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1966 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1967 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1968 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1969 <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1970 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1971 <citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1972 <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1973 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1974 <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1975 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1976 <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1977 <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1978 <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1979 <citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1980 <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1981 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1982 <citerefentry project='man-pages'><refentrytitle>uname</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1983 </para>
1984 </refsect1>
1985
1986 </refentry>