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