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