]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd.special.xml
Various fixes for typos found by lintian (#3705)
[thirdparty/systemd.git] / man / systemd.special.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6 This file is part of systemd.
7
8 Copyright 2010 Lennart Poettering
9
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24 <refentry id="systemd.special">
25
26 <refentryinfo>
27 <title>systemd.special</title>
28 <productname>systemd</productname>
29
30 <authorgroup>
31 <author>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
36 </author>
37 </authorgroup>
38 </refentryinfo>
39
40 <refmeta>
41 <refentrytitle>systemd.special</refentrytitle>
42 <manvolnum>7</manvolnum>
43 </refmeta>
44
45 <refnamediv>
46 <refname>systemd.special</refname>
47 <refpurpose>Special systemd units</refpurpose>
48 </refnamediv>
49
50 <refsynopsisdiv>
51 <para><filename>basic.target</filename>,
52 <filename>bluetooth.target</filename>,
53 <filename>ctrl-alt-del.target</filename>,
54 <filename>cryptsetup.target</filename>,
55 <filename>cryptsetup-pre.target</filename>,
56 <filename>dbus.service</filename>,
57 <filename>dbus.socket</filename>,
58 <filename>default.target</filename>,
59 <filename>display-manager.service</filename>,
60 <filename>emergency.target</filename>,
61 <filename>exit.target</filename>,
62 <filename>final.target</filename>,
63 <filename>getty.target</filename>,
64 <filename>graphical.target</filename>,
65 <filename>halt.target</filename>,
66 <filename>hibernate.target</filename>,
67 <filename>hybrid-sleep.target</filename>,
68 <filename>initrd-fs.target</filename>,
69 <filename>kbrequest.target</filename>,
70 <filename>kexec.target</filename>,
71 <filename>local-fs.target</filename>,
72 <filename>local-fs-pre.target</filename>,
73 <filename>multi-user.target</filename>,
74 <filename>network.target</filename>,
75 <filename>network-online.target</filename>,
76 <filename>network-pre.target</filename>,
77 <filename>nss-lookup.target</filename>,
78 <filename>nss-user-lookup.target</filename>,
79 <filename>paths.target</filename>,
80 <filename>poweroff.target</filename>,
81 <filename>printer.target</filename>,
82 <filename>reboot.target</filename>,
83 <filename>remote-fs.target</filename>,
84 <filename>remote-fs-pre.target</filename>,
85 <filename>rescue.target</filename>,
86 <filename>initrd-root-device.target</filename>,
87 <filename>initrd-root-fs.target</filename>,
88 <filename>rpcbind.target</filename>,
89 <filename>runlevel2.target</filename>,
90 <filename>runlevel3.target</filename>,
91 <filename>runlevel4.target</filename>,
92 <filename>runlevel5.target</filename>,
93 <filename>shutdown.target</filename>,
94 <filename>sigpwr.target</filename>,
95 <filename>sleep.target</filename>,
96 <filename>slices.target</filename>,
97 <filename>smartcard.target</filename>,
98 <filename>sockets.target</filename>,
99 <filename>sound.target</filename>,
100 <filename>suspend.target</filename>,
101 <filename>swap.target</filename>,
102 <filename>sysinit.target</filename>,
103 <filename>syslog.socket</filename>,
104 <filename>system-update.target</filename>,
105 <filename>time-sync.target</filename>,
106 <filename>timers.target</filename>,
107 <filename>umount.target</filename>,
108 <filename>-.slice</filename>,
109 <filename>system.slice</filename>,
110 <filename>user.slice</filename>,
111 <filename>machine.slice</filename></para>
112 </refsynopsisdiv>
113
114 <refsect1>
115 <title>Description</title>
116
117 <para>A few units are treated specially by systemd. They have
118 special internal semantics and cannot be renamed.</para>
119 </refsect1>
120
121 <refsect1>
122 <title>Special System Units</title>
123
124 <variablelist>
125 <varlistentry>
126 <term><filename>basic.target</filename></term>
127 <listitem>
128 <para>A special target unit covering basic boot-up.</para>
129
130 <para>systemd automatically adds dependencies of the types
131 <varname>Requires=</varname> and <varname>After=</varname>
132 for this target unit to all services (except for those with
133 <varname>DefaultDependencies=no</varname>).</para>
134
135 <para>Usually, this should pull-in all local mount points plus
136 <filename>/var</filename>, <filename>/tmp</filename> and
137 <filename>/var/tmp</filename>, swap devices, sockets, timers,
138 path units and other basic initialization necessary for general
139 purpose daemons. The mentioned mount points are special cased
140 to allow them to be remote.
141 </para>
142
143 <para>This target usually does not pull in any non-target units
144 directly, but rather does so indirectly via other early boot targets.
145 It is instead meant as a synchronization point for late boot
146 services. Refer to
147 <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>
148 for details on the targets involved.
149 </para>
150
151 </listitem>
152 </varlistentry>
153 <varlistentry>
154 <term><filename>ctrl-alt-del.target</filename></term>
155 <listitem>
156 <para>systemd starts this target whenever Control+Alt+Del is
157 pressed on the console. Usually, this should be aliased
158 (symlinked) to <filename>reboot.target</filename>.</para>
159 </listitem>
160 </varlistentry>
161 <varlistentry>
162 <term><filename>cryptsetup.target</filename></term>
163 <listitem>
164 <para>A target that pulls in setup services for all
165 encrypted block devices.</para>
166 </listitem>
167 </varlistentry>
168 <varlistentry>
169 <term><filename>dbus.service</filename></term>
170 <listitem>
171 <para>A special unit for the D-Bus bus daemon. As soon as
172 this service is fully started up systemd will connect to it
173 and register its service.</para>
174 </listitem>
175 </varlistentry>
176 <varlistentry>
177 <term><filename>dbus.socket</filename></term>
178 <listitem>
179 <para>A special unit for the D-Bus system bus socket. All
180 units with <varname>Type=dbus</varname> automatically gain a
181 dependency on this unit.</para>
182 </listitem>
183 </varlistentry>
184 <varlistentry>
185 <term><filename>default.target</filename></term>
186 <listitem>
187 <para>The default unit systemd starts at bootup. Usually,
188 this should be aliased (symlinked) to
189 <filename>multi-user.target</filename> or
190 <filename>graphical.target</filename>.</para>
191
192 <para>The default unit systemd starts at bootup can be
193 overridden with the <varname>systemd.unit=</varname> kernel
194 command line option.</para>
195 </listitem>
196 </varlistentry>
197 <varlistentry>
198 <term><filename>display-manager.service</filename></term>
199 <listitem>
200 <para>The display manager service. Usually, this should be
201 aliased (symlinked) to <filename>gdm.service</filename> or a
202 similar display manager service.</para>
203 </listitem>
204 </varlistentry>
205 <varlistentry>
206 <term><filename>emergency.target</filename></term>
207 <listitem>
208 <para>A special target unit that starts an emergency shell on the main console. This target does not pull in
209 any services or mounts. It is the most minimal version of starting the system in order to acquire an
210 interactive shell; the only processes running are usually just the system manager (PID 1) and the shell
211 process. This unit is supposed to be used with the kernel command line option
212 <varname>systemd.unit=</varname>; it is also used when a file system check on a required file system fails,
213 and boot-up cannot continue. Compare with <filename>rescue.target</filename>, which serves a similar purpose,
214 but also starts the most basic services and mounts all file systems.</para>
215
216 <para>Use the <literal>systemd.unit=emergency.target</literal> kernel command line option to boot into this
217 mode. A short alias for this kernel command line option is <literal>emergency</literal>, for compatibility
218 with SysV.</para>
219
220 <para>In many ways booting into <filename>emergency.target</filename> is similar to the effect of booting
221 with <literal>init=/bin/sh</literal> on the kernel command line, except that emergency mode provides you with
222 the full system and service manager, and allows starting individual units in order to continue the boot
223 process in steps.</para>
224 </listitem>
225 </varlistentry>
226 <varlistentry>
227 <term><filename>exit.target</filename></term>
228 <listitem>
229 <para>A special service unit for shutting down the system or
230 user service manager. It is equivalent to
231 <filename>poweroff.target</filename> on non-container
232 systems, and also works in containers.</para>
233
234 <para>systemd will start this unit when it receives a
235 request to shut down over D-Bus or a
236 <constant>SIGTERM</constant> or <constant>SIGINT</constant>
237 signal when running as user service daemon.</para>
238
239 <para>Normally, this (indirectly) pulls in
240 <filename>shutdown.target</filename>, which in turn should be
241 conflicted by all units that want to be scheduled for
242 shutdown when the service manager starts to exit.</para>
243 </listitem>
244 </varlistentry>
245 <varlistentry>
246 <term><filename>final.target</filename></term>
247 <listitem>
248 <para>A special target unit that is used during the shutdown
249 logic and may be used to pull in late services after all
250 normal services are already terminated and all mounts
251 unmounted.
252 </para>
253 </listitem>
254 </varlistentry>
255 <varlistentry>
256 <term><filename>getty.target</filename></term>
257 <listitem>
258 <para>A special target unit that pulls in statically
259 configured local TTY <filename>getty</filename> instances.
260 </para>
261 </listitem>
262 </varlistentry>
263 <varlistentry>
264 <term><filename>graphical.target</filename></term>
265 <listitem>
266 <para>A special target unit for setting up a graphical login
267 screen. This pulls in
268 <filename>multi-user.target</filename>.</para>
269
270 <para>Units that are needed for graphical logins shall add
271 <varname>Wants=</varname> dependencies for their unit to
272 this unit (or <filename>multi-user.target</filename>) during
273 installation. This is best configured via
274 <varname>WantedBy=graphical.target</varname> in the unit's
275 <literal>[Install]</literal> section.</para>
276 </listitem>
277 </varlistentry>
278 <varlistentry>
279 <term><filename>hibernate.target</filename></term>
280 <listitem>
281 <para>A special target unit for hibernating the system. This
282 pulls in <filename>sleep.target</filename>.</para>
283 </listitem>
284 </varlistentry>
285 <varlistentry>
286 <term><filename>hybrid-sleep.target</filename></term>
287 <listitem>
288 <para>A special target unit for hibernating and suspending
289 the system at the same time. This pulls in
290 <filename>sleep.target</filename>.</para>
291 </listitem>
292 </varlistentry>
293 <varlistentry>
294 <term><filename>halt.target</filename></term>
295 <listitem>
296 <para>A special target unit for shutting down and halting
297 the system. Note that this target is distinct from
298 <filename>poweroff.target</filename> in that it generally
299 really just halts the system rather than powering it
300 down.</para>
301
302 <para>Applications wanting to halt the system should start
303 this unit.</para>
304 </listitem>
305 </varlistentry>
306 <varlistentry>
307 <term><filename>initrd-fs.target</filename></term>
308 <listitem>
309 <para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
310 automatically adds dependencies of type
311 <varname>Before=</varname> to
312 <filename>sysroot-usr.mount</filename> and all mount points
313 found in <filename>/etc/fstab</filename> that have
314 <option>x-initrd.mount</option> and not have
315 <option>noauto</option> mount options set.</para>
316 </listitem>
317 </varlistentry>
318 <varlistentry>
319 <term><filename>kbrequest.target</filename></term>
320 <listitem>
321 <para>systemd starts this target whenever Alt+ArrowUp is
322 pressed on the console. This is a good candidate to be
323 aliased (symlinked) to
324 <filename>rescue.target</filename>.</para>
325 </listitem>
326 </varlistentry>
327 <varlistentry>
328 <term><filename>kexec.target</filename></term>
329 <listitem>
330 <para>A special target unit for shutting down and rebooting
331 the system via kexec.</para>
332
333 <para>Applications wanting to reboot the system with kexec
334 should start this unit.</para>
335 </listitem>
336 </varlistentry>
337 <varlistentry>
338 <term><filename>local-fs.target</filename></term>
339 <listitem>
340 <para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
341 automatically adds dependencies of type
342 <varname>Before=</varname> to all mount units that refer to
343 local mount points for this target unit. In addition, it
344 adds dependencies of type <varname>Wants=</varname> to this
345 target unit for those mounts listed in
346 <filename>/etc/fstab</filename> that have the
347 <option>auto</option> mount option set.</para>
348 </listitem>
349 </varlistentry>
350 <varlistentry>
351 <term><filename>multi-user.target</filename></term>
352 <listitem>
353 <para>A special target unit for setting up a multi-user
354 system (non-graphical). This is pulled in by
355 <filename>graphical.target</filename>.</para>
356
357 <para>Units that are needed for a multi-user system shall
358 add <varname>Wants=</varname> dependencies for their unit to
359 this unit during installation. This is best configured via
360 <varname>WantedBy=multi-user.target</varname> in the unit's
361 <literal>[Install]</literal> section.</para>
362 </listitem>
363 </varlistentry>
364 <varlistentry>
365 <term><filename>network-online.target</filename></term>
366 <listitem>
367 <para>Units that strictly require a configured network
368 connection should pull in
369 <filename>network-online.target</filename> (via a
370 <varname>Wants=</varname> type dependency) and order
371 themselves after it. This target unit is intended to pull in
372 a service that delays further execution until the network is
373 sufficiently set up. What precisely this requires is left to
374 the implementation of the network managing service.</para>
375
376 <para>Note the distinction between this unit and
377 <filename>network.target</filename>. This unit is an active
378 unit (i.e. pulled in by the consumer rather than the
379 provider of this functionality) and pulls in a service which
380 possibly adds substantial delays to further execution. In
381 contrast, <filename>network.target</filename> is a passive
382 unit (i.e. pulled in by the provider of the functionality,
383 rather than the consumer) that usually does not delay
384 execution much. Usually, <filename>network.target</filename>
385 is part of the boot of most systems, while
386 <filename>network-online.target</filename> is not, except
387 when at least one unit requires it. Also see <ulink
388 url="http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget">Running
389 Services After the Network is up</ulink> for more
390 information.</para>
391
392 <para>All mount units for remote network file systems
393 automatically pull in this unit, and order themselves after
394 it. Note that networking daemons that simply provide
395 functionality to other hosts generally do not need to pull
396 this in.</para>
397 </listitem>
398 </varlistentry>
399 <varlistentry>
400 <term><filename>paths.target</filename></term>
401 <listitem>
402 <para>A special target unit that sets up all path units (see
403 <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>
404 for details) that shall be active after boot.</para>
405
406 <para>It is recommended that path units installed by
407 applications get pulled in via <varname>Wants=</varname>
408 dependencies from this unit. This is best configured via a
409 <varname>WantedBy=paths.target</varname> in the path unit's
410 <literal>[Install]</literal> section.</para>
411 </listitem>
412 </varlistentry>
413 <varlistentry>
414 <term><filename>poweroff.target</filename></term>
415 <listitem>
416 <para>A special target unit for shutting down and powering
417 off the system.</para>
418
419 <para>Applications wanting to power off the system should
420 start this unit.</para>
421
422 <para><filename>runlevel0.target</filename> is an alias for
423 this target unit, for compatibility with SysV.</para>
424 </listitem>
425 </varlistentry>
426 <varlistentry>
427 <term><filename>reboot.target</filename></term>
428 <listitem>
429 <para>A special target unit for shutting down and rebooting
430 the system.</para>
431
432 <para>Applications wanting to reboot the system should start
433 this unit.</para>
434
435 <para><filename>runlevel6.target</filename> is an alias for
436 this target unit, for compatibility with SysV.</para>
437 </listitem>
438 </varlistentry>
439 <varlistentry>
440 <term><filename>remote-fs.target</filename></term>
441 <listitem>
442 <para>Similar to <filename>local-fs.target</filename>, but
443 for remote mount points.</para>
444
445 <para>systemd automatically adds dependencies of type
446 <varname>After=</varname> for this target unit to all SysV
447 init script service units with an LSB header referring to
448 the <literal>$remote_fs</literal> facility.</para>
449 </listitem>
450 </varlistentry>
451 <varlistentry>
452 <term><filename>rescue.target</filename></term>
453 <listitem>
454 <para>A special target unit that pulls in the base system (including system mounts) and spawns a rescue
455 shell. Isolate to this target in order to administer the system in single-user mode with all file systems
456 mounted but with no services running, except for the most basic. Compare with
457 <filename>emergency.target</filename>, which is much more reduced and does not provide the file systems or
458 most basic services.</para>
459
460 <para><filename>runlevel1.target</filename> is an alias for this target unit, for compatibility with
461 SysV.</para>
462
463 <para>Use the <literal>systemd.unit=rescue.target</literal> kernel command line option to boot into this
464 mode. A short alias for this kernel command line option is <literal>1</literal>, for compatibility with
465 SysV.</para>
466 </listitem>
467 </varlistentry>
468 <varlistentry>
469 <term><filename>initrd-root-device.target</filename></term>
470 <listitem>
471 <para>A special initrd target unit that is reached when the root filesystem device is available, but before
472 it has been mounted.
473 <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
474 and
475 <citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
476 automatically setup the appropriate dependencies to make this happen.
477 </para>
478 </listitem>
479 </varlistentry>
480 <varlistentry>
481 <term><filename>initrd-root-fs.target</filename></term>
482 <listitem>
483 <para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
484 automatically adds dependencies of type
485 <varname>Before=</varname> to the
486 <filename>sysroot.mount</filename> unit, which is generated
487 from the kernel command line.
488 </para>
489 </listitem>
490 </varlistentry>
491 <varlistentry>
492 <term><filename>runlevel2.target</filename></term>
493 <term><filename>runlevel3.target</filename></term>
494 <term><filename>runlevel4.target</filename></term>
495 <term><filename>runlevel5.target</filename></term>
496 <listitem>
497 <para>These are targets that are called whenever the SysV
498 compatibility code asks for runlevel 2, 3, 4, 5,
499 respectively. It is a good idea to make this an alias for
500 (i.e. symlink to) <filename>graphical.target</filename>
501 (for runlevel 5) or <filename>multi-user.target</filename>
502 (the others).</para>
503 </listitem>
504 </varlistentry>
505 <varlistentry>
506 <term><filename>shutdown.target</filename></term>
507 <listitem>
508 <para>A special target unit that terminates the services on
509 system shutdown.</para>
510
511 <para>Services that shall be terminated on system shutdown
512 shall add <varname>Conflicts=</varname> dependencies to this
513 unit for their service unit, which is implicitly done when
514 <varname>DefaultDependencies=yes</varname> is set (the
515 default).</para>
516 </listitem>
517 </varlistentry>
518 <varlistentry>
519 <term><filename>sigpwr.target</filename></term>
520 <listitem>
521 <para>A special target that is started when systemd receives
522 the SIGPWR process signal, which is normally sent by the
523 kernel or UPS daemons when power fails.</para>
524 </listitem>
525 </varlistentry>
526 <varlistentry>
527 <term><filename>sleep.target</filename></term>
528 <listitem>
529 <para>A special target unit that is pulled in by
530 <filename>suspend.target</filename>,
531 <filename>hibernate.target</filename> and
532 <filename>hybrid-sleep.target</filename> and may be used to
533 hook units into the sleep state logic.</para>
534 </listitem>
535 </varlistentry>
536 <varlistentry>
537 <term><filename>slices.target</filename></term>
538 <listitem>
539 <para>A special target unit that sets up all slice units (see
540 <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
541 details) that shall be active after boot. By default the generic <filename>user.slice</filename>,
542 <filename>system.slice</filename>, <filename>machines.slice</filename> slice units, as well as the root
543 slice unit <filename>-.slice</filename> are pulled in and ordered before this unit (see below).</para>
544
545 <para>It's a good idea to add <varname>WantedBy=slices.target</varname> lines to the <literal>[Install]</literal>
546 section of all slices units that may be installed dynamically.</para>
547 </listitem>
548 </varlistentry>
549 <varlistentry>
550 <term><filename>sockets.target</filename></term>
551 <listitem>
552 <para>A special target unit that sets up all socket
553 units (see
554 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>
555 for details) that shall be active after boot.</para>
556
557 <para>Services that can be socket-activated shall add
558 <varname>Wants=</varname> dependencies to this unit for
559 their socket unit during installation. This is best
560 configured via a <varname>WantedBy=sockets.target</varname>
561 in the socket unit's <literal>[Install]</literal>
562 section.</para>
563 </listitem>
564 </varlistentry>
565 <varlistentry>
566 <term><filename>suspend.target</filename></term>
567 <listitem>
568 <para>A special target unit for suspending the system. This
569 pulls in <filename>sleep.target</filename>.</para>
570 </listitem>
571 </varlistentry>
572 <varlistentry>
573 <term><filename>swap.target</filename></term>
574 <listitem>
575 <para>Similar to <filename>local-fs.target</filename>, but
576 for swap partitions and swap files.</para>
577 </listitem>
578 </varlistentry>
579 <varlistentry>
580 <term><filename>sysinit.target</filename></term>
581 <listitem>
582 <para>This target pulls in the services required for system
583 initialization. System services pulled in by this target should
584 declare <varname>DefaultDependencies=no</varname> and specify
585 all their dependencies manually, including access to anything
586 more than a read only root filesystem. For details on the
587 dependencies of this target, refer to
588 <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
589 </para>
590 </listitem>
591 </varlistentry>
592 <varlistentry>
593 <term><filename>syslog.socket</filename></term>
594 <listitem>
595 <para>The socket unit syslog implementations should listen
596 on. All userspace log messages will be made available on
597 this socket. For more information about syslog integration,
598 please consult the <ulink
599 url="http://www.freedesktop.org/wiki/Software/systemd/syslog">Syslog
600 Interface</ulink> document.</para>
601 </listitem>
602 </varlistentry>
603 <varlistentry>
604 <term><filename>system-update.target</filename></term>
605 <listitem>
606 <para>A special target unit that is used for off-line system
607 updates.
608 <citerefentry><refentrytitle>systemd-system-update-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
609 will redirect the boot process to this target if
610 <filename>/system-update</filename> exists. For more
611 information see the <ulink
612 url="http://freedesktop.org/wiki/Software/systemd/SystemUpdates">System
613 Updates Specification</ulink>.</para>
614 </listitem>
615 </varlistentry>
616 <varlistentry>
617 <term><filename>timers.target</filename></term>
618 <listitem>
619 <para>A special target unit that sets up all timer units
620 (see
621 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>
622 for details) that shall be active after boot.</para>
623
624 <para>It is recommended that timer units installed by
625 applications get pulled in via <varname>Wants=</varname>
626 dependencies from this unit. This is best configured via
627 <varname>WantedBy=timers.target</varname> in the timer
628 unit's <literal>[Install]</literal> section.</para>
629 </listitem>
630 </varlistentry>
631 <varlistentry>
632 <term><filename>umount.target</filename></term>
633 <listitem>
634 <para>A special target unit that unmounts all mount and
635 automount points on system shutdown.</para>
636
637 <para>Mounts that shall be unmounted on system shutdown
638 shall add Conflicts dependencies to this unit for their
639 mount unit, which is implicitly done when
640 <varname>DefaultDependencies=yes</varname> is set (the
641 default).</para>
642 </listitem>
643 </varlistentry>
644
645 </variablelist>
646 </refsect1>
647
648 <refsect1>
649 <title>Special System Units for Devices</title>
650
651 <para>Some target units are automatically pulled in as devices of
652 certain kinds show up in the system. These may be used to
653 automatically activate various services based on the specific type
654 of the available hardware.</para>
655
656 <variablelist>
657 <varlistentry>
658 <term><filename>bluetooth.target</filename></term>
659 <listitem>
660 <para>This target is started automatically as soon as a
661 Bluetooth controller is plugged in or becomes available at
662 boot.</para>
663
664 <para>This may be used to pull in Bluetooth management
665 daemons dynamically when Bluetooth hardware is found.</para>
666 </listitem>
667 </varlistentry>
668 <varlistentry>
669 <term><filename>printer.target</filename></term>
670 <listitem>
671 <para>This target is started automatically as soon as a
672 printer is plugged in or becomes available at boot.</para>
673
674 <para>This may be used to pull in printer management daemons
675 dynamically when printer hardware is found.</para>
676 </listitem>
677 </varlistentry>
678 <varlistentry>
679 <term><filename>smartcard.target</filename></term>
680 <listitem>
681 <para>This target is started automatically as soon as a
682 smartcard controller is plugged in or becomes available at
683 boot.</para>
684
685 <para>This may be used to pull in smartcard management
686 daemons dynamically when smartcard hardware is found.</para>
687 </listitem>
688 </varlistentry>
689 <varlistentry>
690 <term><filename>sound.target</filename></term>
691 <listitem>
692 <para>This target is started automatically as soon as a
693 sound card is plugged in or becomes available at
694 boot.</para>
695
696 <para>This may be used to pull in audio management daemons
697 dynamically when audio hardware is found.</para>
698 </listitem>
699 </varlistentry>
700 </variablelist>
701 </refsect1>
702
703 <refsect1>
704 <title>Special Passive System Units </title>
705
706 <para>A number of special system targets are defined that can be
707 used to properly order boot-up of optional services. These targets
708 are generally not part of the initial boot transaction, unless
709 they are explicitly pulled in by one of the implementing services.
710 Note specifically that these <emphasis>passive</emphasis> target
711 units are generally not pulled in by the consumer of a service,
712 but by the provider of the service. This means: a consuming
713 service should order itself after these targets (as appropriate),
714 but not pull it in. A providing service should order itself before
715 these targets (as appropriate) and pull it in (via a
716 <varname>Wants=</varname> type dependency).</para>
717
718 <para>Note that these passive units cannot be started manually,
719 i.e. <literal>systemctl start time-sync.target</literal> will fail
720 with an error. They can only be pulled in by dependency. This is
721 enforced since they exist for ordering purposes only and thus are
722 not useful as only unit within a transaction.</para>
723
724 <variablelist>
725 <varlistentry>
726 <term><filename>cryptsetup-pre.target</filename></term>
727 <listitem>
728 <para>This passive target unit may be pulled in by services
729 that want to run before any encrypted block device is set
730 up. All encrypted block devices are set up after this target
731 has been reached. Since the shutdown order is implicitly the
732 reverse start-up order between units, this target is
733 particularly useful to ensure that a service is shut down
734 only after all encrypted block devices are fully
735 stopped.</para>
736 </listitem>
737 </varlistentry>
738 <varlistentry>
739 <term><filename>local-fs-pre.target</filename></term>
740 <listitem>
741 <para>This target unit is
742 automatically ordered before
743 all local mount points marked
744 with <option>auto</option>
745 (see above). It can be used to
746 execute certain units before
747 all local mounts.</para>
748 </listitem>
749 </varlistentry>
750 <varlistentry>
751 <term><filename>network.target</filename></term>
752 <listitem>
753 <para>This unit is supposed to indicate when network
754 functionality is available, but it is only very weakly
755 defined what that is supposed to mean, with one exception:
756 at shutdown, a unit that is ordered after
757 <filename>network.target</filename> will be stopped before
758 the network — to whatever level it might be set up then —
759 is shut down. It is hence useful when writing service files
760 that require network access on shutdown, which should order
761 themselves after this target, but not pull it in. Also see
762 <ulink url="http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget">Running
763 Services After the Network is up</ulink> for more
764 information. Also see
765 <filename>network-online.target</filename> described
766 above.</para>
767
768 <para>systemd automatically adds dependencies of type
769 <varname>After=</varname> for this target unit to all SysV
770 init script service units with an LSB header referring to
771 the <literal>$network</literal> facility.</para>
772 </listitem>
773 </varlistentry>
774 <varlistentry>
775 <term><filename>network-pre.target</filename></term>
776 <listitem>
777 <para>This passive target unit may be pulled in by services
778 that want to run before any network is set up, for example
779 for the purpose of setting up a firewall. All network
780 management software orders itself after this target, but
781 does not pull it in.</para>
782 </listitem>
783 </varlistentry>
784 <varlistentry>
785 <term><filename>nss-lookup.target</filename></term>
786 <listitem>
787 <para>A target that should be used as synchronization point
788 for all host/network name service lookups. Note that this is
789 independent of user/group name lookups for which
790 <filename>nss-user-lookup.target</filename> should be used.
791 All services for which the availability of full host/network
792 name resolution is essential should be ordered after this
793 target, but not pull it in. systemd automatically adds
794 dependencies of type <varname>After=</varname> for this
795 target unit to all SysV init script service units with an
796 LSB header referring to the <literal>$named</literal>
797 facility.</para>
798 </listitem>
799 </varlistentry>
800 <varlistentry>
801 <term><filename>nss-user-lookup.target</filename></term>
802 <listitem>
803 <para>A target that should be used as synchronization point
804 for all user/group name service lookups. Note that this is
805 independent of host/network name lookups for which
806 <filename>nss-lookup.target</filename> should be used. All
807 services for which the availability of the full user/group
808 database is essential should be ordered after this target,
809 but not pull it in. Note that system users are always
810 resolvable, and hence do not require any special ordering
811 against this target.</para>
812 </listitem>
813 </varlistentry>
814 <varlistentry>
815 <term><filename>remote-fs-pre.target</filename></term>
816 <listitem>
817 <para>This target unit is automatically ordered before all
818 remote mount point units (see above). It can be used to run
819 certain units before the remote mounts are established. Note
820 that this unit is generally not part of the initial
821 transaction, unless the unit that wants to be ordered before
822 all remote mounts pulls it in via a
823 <varname>Wants=</varname> type dependency. If the unit wants
824 to be pulled in by the first remote mount showing up, it
825 should use <filename>network-online.target</filename> (see
826 above).</para>
827 </listitem>
828 </varlistentry>
829 <varlistentry>
830 <term><filename>rpcbind.target</filename></term>
831 <listitem>
832 <para>The portmapper/rpcbind pulls in this target and orders
833 itself before it, to indicate its availability. systemd
834 automatically adds dependencies of type
835 <varname>After=</varname> for this target unit to all SysV
836 init script service units with an LSB header referring to
837 the <literal>$portmap</literal> facility.</para>
838 </listitem>
839 </varlistentry>
840 <varlistentry>
841 <term><filename>time-sync.target</filename></term>
842 <listitem>
843 <para>Services responsible for synchronizing the system
844 clock from a remote source (such as NTP client
845 implementations) should pull in this target and order
846 themselves before it. All services where correct time is
847 essential should be ordered after this unit, but not pull it
848 in. systemd automatically adds dependencies of type
849 <varname>After=</varname> for this target unit to all SysV
850 init script service units with an LSB header referring to
851 the <literal>$time</literal> facility. </para>
852 </listitem>
853 </varlistentry>
854 </variablelist>
855 </refsect1>
856
857 <refsect1>
858 <title>Special User Units</title>
859
860 <para>When systemd runs as a user instance, the following special
861 units are available, which have similar definitions as their
862 system counterparts:
863 <filename>exit.target</filename>,
864 <filename>default.target</filename>,
865 <filename>shutdown.target</filename>,
866 <filename>sockets.target</filename>,
867 <filename>timers.target</filename>,
868 <filename>paths.target</filename>,
869 <filename>bluetooth.target</filename>,
870 <filename>printer.target</filename>,
871 <filename>smartcard.target</filename>,
872 <filename>sound.target</filename>.</para>
873 </refsect1>
874
875 <refsect1>
876 <title>Special Slice Units</title>
877
878 <para>There are four <literal>.slice</literal> units which form
879 the basis of the hierarchy for assignment of resources for
880 services, users, and virtual machines or containers.</para>
881
882 <variablelist>
883 <varlistentry>
884 <term><filename>-.slice</filename></term>
885 <listitem>
886 <para>The root slice is the root of the hierarchy. It
887 usually does not contain units directly, but may be used to
888 set defaults for the whole tree.</para>
889 </listitem>
890 </varlistentry>
891
892 <varlistentry>
893 <term><filename>system.slice</filename></term>
894 <listitem>
895 <para>By default, all system services started by
896 <command>systemd</command> are found in this slice.</para>
897 </listitem>
898 </varlistentry>
899
900 <varlistentry>
901 <term><filename>user.slice</filename></term>
902 <listitem>
903 <para>By default, all user processes and services started on
904 behalf of the user, including the per-user systemd instance
905 are found in this slice.</para>
906 </listitem>
907 </varlistentry>
908
909 <varlistentry>
910 <term><filename>machine.slice</filename></term>
911 <listitem>
912 <para>By default, all virtual machines and containers
913 registered with <command>systemd-machined</command> are
914 found in this slice.
915 </para>
916 </listitem>
917 </varlistentry>
918 </variablelist>
919 </refsect1>
920
921 <refsect1>
922 <title>See Also</title>
923 <para>
924 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
925 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
926 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
927 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
928 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
929 <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
930 <citerefentry project='man-pages'><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
931 <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
932 </para>
933 </refsect1>
934
935 </refentry>