]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd.special.xml
tmpfiles: fix compilation without acl support
[thirdparty/systemd.git] / man / systemd.special.xml
CommitLineData
9f235308
LP
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
5430f7f2
LP
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
9f235308
LP
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
5430f7f2 18 Lesser General Public License for more details.
9f235308 19
5430f7f2 20 You should have received a copy of the GNU Lesser General Public License
9f235308
LP
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>
feb88c9f 47 <refpurpose>Special systemd units</refpurpose>
9f235308
LP
48 </refnamediv>
49
50 <refsynopsisdiv>
9f2c5942 51 <para><filename>basic.target</filename>,
49dbfa7b 52 <filename>bluetooth.target</filename>,
9f2c5942 53 <filename>ctrl-alt-del.target</filename>,
49dbfa7b 54 <filename>cryptsetup.target</filename>,
9542239e 55 <filename>cryptsetup-pre.target</filename>,
83bda358 56 <filename>dbus.service</filename>,
feb88c9f 57 <filename>dbus.socket</filename>,
9f2c5942 58 <filename>default.target</filename>,
1e287fe3 59 <filename>display-manager.service</filename>,
f057408c 60 <filename>emergency.target</filename>,
0e0320e0
LP
61 <filename>exit.target</filename>,
62 <filename>final.target</filename>,
49dbfa7b 63 <filename>getty.target</filename>,
9f2c5942 64 <filename>graphical.target</filename>,
669b04a4 65 <filename>halt.target</filename>,
6edd7d0a 66 <filename>hibernate.target</filename>,
6524990f 67 <filename>hybrid-sleep.target</filename>,
700e07ff 68 <filename>initrd-fs.target</filename>,
9f2c5942 69 <filename>kbrequest.target</filename>,
feb88c9f 70 <filename>kexec.target</filename>,
9f2c5942 71 <filename>local-fs.target</filename>,
21e557ed 72 <filename>local-fs-pre.target</filename>,
9f2c5942
LP
73 <filename>multi-user.target</filename>,
74 <filename>network.target</filename>,
0c17fbce 75 <filename>network-online.target</filename>,
a4a878d0 76 <filename>network-pre.target</filename>,
9f2c5942 77 <filename>nss-lookup.target</filename>,
49dbfa7b 78 <filename>nss-user-lookup.target</filename>,
e3d84721 79 <filename>paths.target</filename>,
9f2c5942 80 <filename>poweroff.target</filename>,
49dbfa7b 81 <filename>printer.target</filename>,
9f2c5942
LP
82 <filename>reboot.target</filename>,
83 <filename>remote-fs.target</filename>,
21e557ed 84 <filename>remote-fs-pre.target</filename>,
9f2c5942 85 <filename>rescue.target</filename>,
9e5f0f92 86 <filename>initrd-root-fs.target</filename>,
9f2c5942 87 <filename>rpcbind.target</filename>,
9f2c5942
LP
88 <filename>runlevel2.target</filename>,
89 <filename>runlevel3.target</filename>,
90 <filename>runlevel4.target</filename>,
91 <filename>runlevel5.target</filename>,
9f2c5942
LP
92 <filename>shutdown.target</filename>,
93 <filename>sigpwr.target</filename>,
6edd7d0a 94 <filename>sleep.target</filename>,
49dbfa7b 95 <filename>smartcard.target</filename>,
9f2c5942 96 <filename>sockets.target</filename>,
49dbfa7b 97 <filename>sound.target</filename>,
6edd7d0a 98 <filename>suspend.target</filename>,
9f2c5942 99 <filename>swap.target</filename>,
f92a18f5 100 <filename>sysinit.target</filename>,
feb88c9f 101 <filename>syslog.socket</filename>,
f5ccf26d 102 <filename>system-update.target</filename>,
db47cc2a 103 <filename>time-sync.target</filename>,
e3d84721 104 <filename>timers.target</filename>,
fade1ec6
ZJS
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>
9f235308
LP
110 </refsynopsisdiv>
111
112 <refsect1>
113 <title>Description</title>
114
115 <para>A few units are treated specially by
116 systemd. They have special internal semantics and
117 cannot be renamed.</para>
118 </refsect1>
119
120 <refsect1>
121 <title>Special System Units</title>
122
123 <variablelist>
bd3d19a4
LP
124 <varlistentry>
125 <term><filename>basic.target</filename></term>
126 <listitem>
127 <para>A special target unit
e3d84721 128 covering basic boot-up.</para>
bd3d19a4
LP
129 <para>systemd automatically
130 adds dependencies of the types
e3d84721
LP
131 <varname>Requires=</varname>
132 and <varname>After=</varname>
133 for this target unit to all
134 services (except for those
135 with
136 <varname>DefaultDependencies=no</varname>).</para>
137
138 <para>Usually this should
139 pull-in all mount points, swap
140 devices, sockets, timers, and
141 path units and other basic
f92a18f5 142 initialization necessary for
e3d84721
LP
143 general purpose
144 daemons.</para>
bd3d19a4
LP
145 </listitem>
146 </varlistentry>
147 <varlistentry>
148 <term><filename>ctrl-alt-del.target</filename></term>
149 <listitem>
150 <para>systemd starts this
151 target whenever
152 Control+Alt+Del is pressed on
153 the console. Usually this
154 should be aliased (symlinked)
155 to
156 <filename>reboot.target</filename>.</para>
157 </listitem>
158 </varlistentry>
49dbfa7b
LP
159 <varlistentry>
160 <term><filename>cryptsetup.target</filename></term>
161 <listitem>
162 <para>A target that pulls in
163 setup services for all
164 encrypted block
165 devices.</para>
166 </listitem>
167 </varlistentry>
eeb7229c 168 <varlistentry>
83bda358 169 <term><filename>dbus.service</filename></term>
eeb7229c
LP
170 <listitem>
171 <para>A special unit for the
e3d84721 172 D-Bus bus daemon. As soon as
eeb7229c
LP
173 this service is fully started
174 up systemd will connect to it
175 and register its
176 service.</para>
177 </listitem>
178 </varlistentry>
feb88c9f
LP
179 <varlistentry>
180 <term><filename>dbus.socket</filename></term>
181 <listitem>
182 <para>A special unit for the
183 D-Bus system bus socket. All
184 units with
e3d84721 185 <varname>Type=dbus</varname>
feb88c9f
LP
186 automatically gain a
187 dependency on this
188 unit.</para>
189 </listitem>
190 </varlistentry>
bd3d19a4
LP
191 <varlistentry>
192 <term><filename>default.target</filename></term>
193 <listitem>
194 <para>The default unit systemd
195 starts at bootup. Usually this
196 should be aliased (symlinked)
197 to
198 <filename>multi-user.target</filename>
199 or
200 <filename>graphical.target</filename>.</para>
e3d84721 201
bd3d19a4
LP
202 <para>The default unit systemd
203 starts at bootup can be
8f28cbcd 204 overridden with the
2d87855a 205 <varname>systemd.unit=</varname>
bd3d19a4
LP
206 kernel command line option.</para>
207 </listitem>
208 </varlistentry>
1e287fe3
LP
209 <varlistentry>
210 <term><filename>display-manager.service</filename></term>
211 <listitem>
212 <para>The display manager
213 service. Usually this should
214 be aliased (symlinked) to
feb88c9f 215 <filename>gdm.service</filename>
1e287fe3
LP
216 or a similar display manager
217 service.</para>
1e287fe3
LP
218 </listitem>
219 </varlistentry>
9f235308 220 <varlistentry>
f057408c 221 <term><filename>emergency.target</filename></term>
9f235308 222 <listitem>
f057408c 223 <para>A special target unit
9f235308
LP
224 that starts an emergency
225 shell on the main
226 console. This unit is supposed
227 to be used with the kernel
228 command line option
2d87855a 229 <varname>systemd.unit=</varname>
9f235308
LP
230 and has otherwise little use.
231 </para>
232 </listitem>
233 </varlistentry>
feb88c9f
LP
234 <varlistentry>
235 <term><filename>final.target</filename></term>
236 <listitem>
237 <para>A special target unit
238 that is used during the
239 shutdown logic and may be used
240 to pull in late services after
241 all normal services are
242 already terminated and all
243 mounts unmounted.
244 </para>
245 </listitem>
246 </varlistentry>
49dbfa7b
LP
247 <varlistentry>
248 <term><filename>getty.target</filename></term>
249 <listitem>
250 <para>A special target unit
e3d84721
LP
251 that pulls in statically
252 configured local TTY
253 <filename>getty</filename>
254 instances.
49dbfa7b
LP
255 </para>
256 </listitem>
257 </varlistentry>
bd3d19a4
LP
258 <varlistentry>
259 <term><filename>graphical.target</filename></term>
260 <listitem>
261 <para>A special target unit
262 for setting up a graphical
263 login screen. This pulls in
264 <filename>multi-user.target</filename>.</para>
265
266 <para>Units that are needed
e3d84721
LP
267 for graphical logins shall add
268 <varname>Wants=</varname>
269 dependencies for their unit to
270 this unit (or
bd3d19a4 271 <filename>multi-user.target</filename>)
e3d84721
LP
272 during installation. This is
273 best configured via
274 <varname>WantedBy=graphical.target</varname>
275 in the unit's
276 <literal>[Install]</literal>
277 section.</para>
bd3d19a4
LP
278 </listitem>
279 </varlistentry>
6edd7d0a
LP
280 <varlistentry>
281 <term><filename>hibernate.target</filename></term>
282 <listitem>
283 <para>A special target unit
284 for hibernating the
285 system. This pulls in
286 <filename>sleep.target</filename>.</para>
287 </listitem>
288 </varlistentry>
6524990f
LP
289 <varlistentry>
290 <term><filename>hybrid-sleep.target</filename></term>
291 <listitem>
292 <para>A special target unit
293 for hibernating and suspending the
294 system at the same time. This pulls in
295 <filename>sleep.target</filename>.</para>
296 </listitem>
297 </varlistentry>
bd3d19a4
LP
298 <varlistentry>
299 <term><filename>halt.target</filename></term>
300 <listitem>
301 <para>A special target unit
e3d84721
LP
302 for shutting down and halting
303 the system. Note that this
304 target is distinct from
305 <filename>poweroff.target</filename>
306 in that it generally really
307 just halts the system rather
308 than powering it down.</para>
bd3d19a4
LP
309
310 <para>Applications wanting to
311 halt the system should start
312 this unit.</para>
313 </listitem>
314 </varlistentry>
700e07ff
HH
315 <varlistentry>
316 <term><filename>initrd-fs.target</filename></term>
317 <listitem>
e3d84721
LP
318 <para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
319 automatically adds
320 dependencies of type
321 <varname>Before=</varname> to
322 <filename>sysroot-usr.mount</filename>
5e9dfd2e 323 and all mount points found in
700e07ff 324 <filename>/etc/fstab</filename>
ee43f49b 325 that have
700e07ff 326 <option>x-initrd.mount</option>
ee43f49b
ZJS
327 and not have <option>noauto</option>
328 mount options set.</para>
700e07ff
HH
329 </listitem>
330 </varlistentry>
bd3d19a4
LP
331 <varlistentry>
332 <term><filename>kbrequest.target</filename></term>
333 <listitem>
334 <para>systemd starts this
335 target whenever Alt+ArrowUp is
336 pressed on the console. This
337 is a good candidate to be
338 aliased (symlinked) to
339 <filename>rescue.target</filename>.</para>
340 </listitem>
341 </varlistentry>
feb88c9f
LP
342 <varlistentry>
343 <term><filename>kexec.target</filename></term>
344 <listitem>
345 <para>A special target unit
346 for shutting down and rebooting the system via kexec.</para>
347
348 <para>Applications wanting to
349 reboot the system with kexec should start
350 this unit.</para>
351 </listitem>
352 </varlistentry>
9f235308
LP
353 <varlistentry>
354 <term><filename>local-fs.target</filename></term>
355 <listitem>
e3d84721
LP
356 <para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
357 automatically adds
358 dependencies of type
359 <varname>Before=</varname> to
360 all mount units that refer to
361 local mount points for this
362 target unit. In addition, it
9f235308 363 adds dependencies of type
e3d84721 364 <varname>Wants=</varname> to
bd3d19a4
LP
365 this target unit for those
366 mounts listed in
9f235308
LP
367 <filename>/etc/fstab</filename>
368 that have the
e3d84721
LP
369 <option>auto</option> mount
370 option set.</para>
9f235308
LP
371 </listitem>
372 </varlistentry>
bd3d19a4
LP
373 <varlistentry>
374 <term><filename>multi-user.target</filename></term>
375 <listitem>
376 <para>A special target unit
377 for setting up a multi-user
378 system (non-graphical). This
379 is pulled in by
380 <filename>graphical.target</filename>.</para>
381
382 <para>Units that are needed
383 for a multi-user system shall
e3d84721
LP
384 add <varname>Wants=</varname>
385 dependencies for their unit to
386 this unit during
387 installation. This is best
388 configured via
32ce5ae2 389 <varname>WantedBy=multi-user.target</varname>
e3d84721
LP
390 in the unit's
391 <literal>[Install]</literal>
392 section.</para>
bd3d19a4
LP
393 </listitem>
394 </varlistentry>
0c17fbce
LP
395 <varlistentry>
396 <term><filename>network-online.target</filename></term>
397 <listitem>
398 <para>Units that strictly
399 require a configured network
400 connection should pull in
401 <filename>network-online.target</filename>
402 (via a
403 <varname>Wants=</varname> type
404 dependency) and order
405 themselves after it. This
406 target unit is intended to
407 pull in a service that delays
408 further execution until the
409 network is sufficiently set
410 up. What precisely this
411 requires is left to the
412 implementation of the network
413 managing service.</para>
414
415 <para>Note the distinction
416 between this unit and
417 <filename>network.target</filename>. This
418 unit is an active unit
419 (i.e. pulled in by the
420 consumer rather than the
421 provider of this
422 functionality) and pulls in a
423 service which possibly adds
424 substantial delays to further
425 execution. In contrast,
426 <filename>network.target</filename>
427 is a passive unit (i.e. pulled
428 in by the provider of the
429 functionality, rather than the
430 consumer) that usually does
431 not delay execution
432 much. Usually,
433 <filename>network.target</filename>
434 is part of the boot of most
435 systems, while
436 <filename>network-online.target</filename>
437 is not, except when at least
438 one unit requires it. Also see
439 <ulink
440 url="http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget">Running
441 Services After the Network is
442 up</ulink> for more
443 information.</para>
444
445 <para>All mount units for
446 remote network file systems
447 automatically pull in this
448 unit, and order themselves
449 after it. Note that networking
450 daemons that simply provide
451 functionality to other hosts
6b4991cf 452 generally do not need to pull
0c17fbce
LP
453 this in.</para>
454 </listitem>
455 </varlistentry>
e3d84721
LP
456 <varlistentry>
457 <term><filename>paths.target</filename></term>
458 <listitem>
459 <para>A special target unit
460 that sets up all path units
461 (see
462 <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>
463 for details) that shall be
464 active after boot.</para>
465
466 <para>It is recommended that
467 path units installed by
468 applications get pulled in via
469 <varname>Wants=</varname>
470 dependencies from this
471 unit. This is best configured
472 via a
473 <varname>WantedBy=paths.target</varname>
474 in the path unit's
475 <literal>[Install]</literal>
476 section.</para>
477 </listitem>
478 </varlistentry>
bd3d19a4
LP
479 <varlistentry>
480 <term><filename>poweroff.target</filename></term>
481 <listitem>
482 <para>A special target unit
483 for shutting down and powering off the system.</para>
484
485 <para>Applications wanting to
486 power off the system should start
487 this unit.</para>
488
489 <para><filename>runlevel0.target</filename>
490 is an alias for this target
491 unit, for compatibility with SysV.</para>
492 </listitem>
493 </varlistentry>
494 <varlistentry>
495 <term><filename>reboot.target</filename></term>
496 <listitem>
497 <para>A special target unit
498 for shutting down and rebooting the system.</para>
499
500 <para>Applications wanting to
501 reboot the system should start
502 this unit.</para>
503
504 <para><filename>runlevel6.target</filename>
505 is an alias for this target
506 unit, for compatibility with SysV.</para>
507 </listitem>
508 </varlistentry>
9f235308
LP
509 <varlistentry>
510 <term><filename>remote-fs.target</filename></term>
511 <listitem>
bd3d19a4
LP
512 <para>Similar to
513 <filename>local-fs.target</filename>,
514 but for remote mount
515 points.</para>
516
9f235308
LP
517 <para>systemd automatically
518 adds dependencies of type
e3d84721
LP
519 <varname>After=</varname> for
520 this target unit to all SysV
521 init script service units with
522 an LSB header referring to the
1e89ced1 523 <literal>$remote_fs</literal>
9f235308
LP
524 facility.</para>
525 </listitem>
526 </varlistentry>
bd3d19a4
LP
527 <varlistentry>
528 <term><filename>rescue.target</filename></term>
529 <listitem>
530 <para>A special target unit
531 for setting up the base system
532 and a rescue shell.</para>
533
534 <para><filename>runlevel1.target</filename>
535 is an alias for this target
536 unit, for compatibility with SysV.</para>
537 </listitem>
538 </varlistentry>
700e07ff 539 <varlistentry>
9e5f0f92 540 <term><filename>initrd-root-fs.target</filename></term>
700e07ff 541 <listitem>
e3d84721
LP
542 <para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
543 automatically adds
544 dependencies of type
545 <varname>Before=</varname> to
546 the
547 <filename>sysroot.mount</filename>
548 unit, which is generated from
549 the kernel command line.
700e07ff
HH
550 </para>
551 </listitem>
552 </varlistentry>
bd3d19a4
LP
553 <varlistentry>
554 <term><filename>runlevel2.target</filename></term>
bd3d19a4 555 <term><filename>runlevel3.target</filename></term>
bd3d19a4 556 <term><filename>runlevel4.target</filename></term>
bd3d19a4
LP
557 <term><filename>runlevel5.target</filename></term>
558 <listitem>
669b04a4
LP
559 <para>These are targets that
560 are called whenever the SysV
bd3d19a4 561 compatibility code asks for
669b04a4
LP
562 runlevel 2, 3, 4, 5,
563 respectively. It is a good
564 idea to make this an alias for
bd3d19a4
LP
565 (i.e. symlink to)
566 <filename>multi-user.target</filename>
669b04a4
LP
567 (for runlevel 2) or
568 <filename>graphical.target</filename>
569 (the others).</para>
bd3d19a4
LP
570 </listitem>
571 </varlistentry>
9f235308
LP
572 <varlistentry>
573 <term><filename>shutdown.target</filename></term>
574 <listitem>
575 <para>A special target unit
576 that terminates the services
577 on system shutdown.</para>
578
579 <para>Services that shall be
580 terminated on system shutdown
e3d84721 581 shall add <varname>Conflicts=</varname>
bd3d19a4 582 dependencies to this unit for
3b6fdb5b
LP
583 their service unit, which is
584 implicitly done when
585 <varname>DefaultDependencies=yes</varname>
586 is set (the default).</para>
9f235308
LP
587 </listitem>
588 </varlistentry>
589 <varlistentry>
590 <term><filename>sigpwr.target</filename></term>
591 <listitem>
592 <para>A special target that is
593 started when systemd receives
594 the SIGPWR process signal,
595 which is normally sent by the
bd3d19a4 596 kernel or UPS daemons when
9f235308
LP
597 power fails.</para>
598 </listitem>
599 </varlistentry>
6edd7d0a
LP
600 <varlistentry>
601 <term><filename>sleep.target</filename></term>
602 <listitem>
603 <para>A special target unit
604 that is pulled in by
6524990f 605 <filename>suspend.target</filename>,
e3d84721
LP
606 <filename>hibernate.target</filename>
607 and
608 <filename>hybrid-sleep.target</filename>
6edd7d0a
LP
609 and may be used to hook units
610 into the sleep state
611 logic.</para>
612 </listitem>
613 </varlistentry>
9f235308
LP
614 <varlistentry>
615 <term><filename>sockets.target</filename></term>
616 <listitem>
617 <para>A special target unit
e3d84721
LP
618 that sets up all socket
619 units.(see
620 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>
621 for details) that shall be
622 active after boot.</para>
9f235308
LP
623
624 <para>Services that can be
625 socket-activated shall add
e3d84721
LP
626 <varname>Wants=</varname>
627 dependencies to this unit for
628 their socket unit during
629 installation. This is best
630 configured via a
631 <varname>WantedBy=sockets.target</varname>
632 in the socket unit's
633 <literal>[Install]</literal>
634 section.</para>
9f235308
LP
635 </listitem>
636 </varlistentry>
6edd7d0a
LP
637 <varlistentry>
638 <term><filename>suspend.target</filename></term>
639 <listitem>
640 <para>A special target unit
641 for suspending the
642 system. This pulls in
643 <filename>sleep.target</filename>.</para>
644 </listitem>
645 </varlistentry>
9f235308
LP
646 <varlistentry>
647 <term><filename>swap.target</filename></term>
648 <listitem>
649 <para>Similar to
650 <filename>local-fs.target</filename>, but for swap
651 partitions and swap
652 files.</para>
653 </listitem>
654 </varlistentry>
f92a18f5
LP
655 <varlistentry>
656 <term><filename>sysinit.target</filename></term>
657 <listitem>
658 <para>A special target unit
659 covering early boot-up scripts.</para>
f92a18f5
LP
660 </listitem>
661 </varlistentry>
feb88c9f
LP
662 <varlistentry>
663 <term><filename>syslog.socket</filename></term>
664 <listitem>
f848f8d8 665 <para>The socket unit
feb88c9f
LP
666 syslog implementations should
667 listen on. All userspace log
668 messages will be made
99800333
LP
669 available on this socket. For
670 more information about syslog
671 integration, please consult
672 the <ulink
673 url="http://www.freedesktop.org/wiki/Software/systemd/syslog">Syslog
674 Interface</ulink>
675 document.</para>
feb88c9f
LP
676 </listitem>
677 </varlistentry>
f5ccf26d
LP
678 <varlistentry>
679 <term><filename>system-update.target</filename></term>
680 <listitem>
681 <para>A special target unit
682 that is used for off-line
683 system updates.
684 <citerefentry><refentrytitle>systemd-system-update-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
685 will redirect the boot process
686 to this target if
687 <filename>/system-update</filename>
688 exists. For more information
689 see the <ulink
690 url="http://freedesktop.org/wiki/Software/systemd/SystemUpdates">System
691 Updates
692 Specification</ulink>.</para>
693 </listitem>
694 </varlistentry>
e3d84721
LP
695 <varlistentry>
696 <term><filename>timers.target</filename></term>
697 <listitem>
698 <para>A special target unit
699 that sets up all timer
700 units (see
701 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>
702 for details) that shall be
703 active after boot.</para>
704
705 <para>It is recommended that
706 timer units installed by
707 applications get pulled in via
708 <varname>Wants=</varname>
709 dependencies from this
710 unit. This is best configured
711 via
712 <varname>WantedBy=timers.target</varname>
713 in the timer unit's
714 <literal>[Install]</literal>
715 section.</para>
716 </listitem>
717 </varlistentry>
3b6fdb5b
LP
718 <varlistentry>
719 <term><filename>umount.target</filename></term>
720 <listitem>
721 <para>A special target unit
722 that umounts all mount and
723 automount points on system
724 shutdown.</para>
725
726 <para>Mounts that shall be
727 unmounted on system shutdown
728 shall add Conflicts
729 dependencies to this unit for
730 their mount unit, which is
731 implicitly done when
732 <varname>DefaultDependencies=yes</varname>
733 is set (the default).</para>
734 </listitem>
735 </varlistentry>
f5ccf26d 736
54f874c5
LP
737 </variablelist>
738 </refsect1>
739
740 <refsect1>
741 <title>Special System Units for Devices</title>
742
743 <para>Some target units are automatically pulled in as
744 devices of certain kinds show up in the system. These
745 may be used to automatically activate various services
746 based on the specific type of the available
747 hardware.</para>
748
749 <variablelist>
750 <varlistentry>
751 <term><filename>bluetooth.target</filename></term>
752 <listitem>
753 <para>This target is started
754 automatically as soon as a
755 Bluetooth controller is
756 plugged in or becomes
757 available at boot.</para>
758
759 <para>This may be used to pull
760 in Bluetooth management
761 daemons dynamically when
762 Bluetooth hardware is
763 found.</para>
764 </listitem>
765 </varlistentry>
766 <varlistentry>
767 <term><filename>printer.target</filename></term>
768 <listitem>
769 <para>This target is started
770 automatically as soon as a
771 printer is plugged in or
772 becomes available at
773 boot.</para>
774
775 <para>This may be used to pull
776 in printer management
777 daemons dynamically when
778 printer hardware is
779 found.</para>
780 </listitem>
781 </varlistentry>
782 <varlistentry>
783 <term><filename>smartcard.target</filename></term>
784 <listitem>
785 <para>This target is started
786 automatically as soon as a
787 smartcard controller is
788 plugged in or becomes
789 available at boot.</para>
790
791 <para>This may be used to pull
ab75ca91 792 in smartcard management
54f874c5
LP
793 daemons dynamically when
794 smartcard hardware is
795 found.</para>
796 </listitem>
797 </varlistentry>
798 <varlistentry>
799 <term><filename>sound.target</filename></term>
800 <listitem>
801 <para>This target is started
802 automatically as soon as a
803 sound card is plugged in or
804 becomes available at
805 boot.</para>
806
807 <para>This may be used to pull
808 in audio management daemons
ab75ca91 809 dynamically when audio
54f874c5
LP
810 hardware is found.</para>
811 </listitem>
812 </varlistentry>
813 </variablelist>
814 </refsect1>
815
816 <refsect1>
817 <title>Special Passive System Units </title>
818
819 <para>A number of special system targets are defined
820 that can be used to properly order boot-up of optional
821 services. These targets are generally not part of the
822 initial boot transaction, unless they are explicitly
823 pulled in by one of the implementing services. Note
73e231ab 824 specifically that these <emphasis>passive</emphasis>
54f874c5
LP
825 target units are generally not pulled in by the
826 consumer of a service, but by the provider of the
827 service. This means: a consuming service should order
828 itself after these targets (as appropriate), but not
829 pull it in. A providing service should order itself
830 before these targets (as appropriate) and pull it in
831 (via a <varname>Wants=</varname> type
832 dependency).</para>
833
dfebfe67
LP
834 <para>Note that these passive units cannot be started
835 manually, i.e. <literal>systemctl start
836 time-sync.target</literal> will fail with an
837 error. They can only be pulled in by dependency. This
838 is enforced since they exist for ordering purposes
839 only and thus are not useful as only unit within a
840 transaction.</para>
841
54f874c5 842 <variablelist>
9542239e
LP
843 <varlistentry>
844 <term><filename>cryptsetup-pre.target</filename></term>
845 <listitem>
846 <para>This passive target unit
847 may be pulled in by services
848 that want to run before any
849 encrypted block device is set
850 up. All encrypted block
851 devices are set up after this
852 target has been reached. Since
853 the shutdown order is
854 implicitly the reverse
8d0e0ddd 855 start-up order between units,
9542239e
LP
856 this target is particularly
857 useful to ensure that a
858 service is shut down only
859 after all encrypted block
860 devices are fully
861 stopped.</para>
862 </listitem>
863 </varlistentry>
54f874c5
LP
864 <varlistentry>
865 <term><filename>local-fs-pre.target</filename></term>
866 <listitem>
867 <para>This target unit is
868 automatically ordered before
869 all local mount points marked
870 with <option>auto</option>
871 (see above). It can be used to
872 execute certain units before
873 all local mounts.</para>
874 </listitem>
875 </varlistentry>
1183f9b2
LP
876 <varlistentry>
877 <term><filename>network.target</filename></term>
878 <listitem>
0c17fbce
LP
879 <para>This unit is supposed to
880 indicate when network
881 functionality is available,
882 but it is only very weakly
883 defined what that is supposed
884 to mean, with one exception:
885 at shutdown, a unit that is
886 ordered after
887 <filename>network.target</filename>
888 will be stopped before the
889 network -- to whatever level
890 it might be set up then -- is
51cb9d73
LP
891 shut down. It is hence useful
892 when writing service files
893 that require network access on
894 shutdown, which should order
895 themselves after this target,
896 but not pull it in. Also see
897 <ulink
0c17fbce
LP
898 url="http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget">Running
899 Services After the Network is
900 up</ulink> for more
901 information. Also see
902 <filename>network-online.target</filename>
903 described above.</para>
904
1183f9b2
LP
905 <para>systemd automatically
906 adds dependencies of type
907 <varname>After=</varname> for
908 this target unit to all SysV
909 init script service units with
910 an LSB header referring to the
911 <literal>$network</literal>
912 facility.</para>
1183f9b2
LP
913 </listitem>
914 </varlistentry>
a4a878d0
LP
915 <varlistentry>
916 <term><filename>network-pre.target</filename></term>
917 <listitem>
918 <para>This passive target unit
919 may be pulled in by services
920 that want to run before any
921 network is set up, for example
922 for the purpose of setting up a
923 firewall. All network
924 management software orders
925 itself after this target, but
926 does not pull it in.</para>
927 </listitem>
928 </varlistentry>
54f874c5
LP
929 <varlistentry>
930 <term><filename>nss-lookup.target</filename></term>
931 <listitem>
932 <para>A target that should be
933 used as synchronization point
934 for all host/network name
935 service lookups. Note that
936 this is independent of
937 user/group name lookups for
938 which
939 <filename>nss-user-lookup.target</filename>
51cb9d73
LP
940 should be used. All services
941 for which the availability of
942 full host/network name
943 resolution is essential should
944 be ordered after this target,
945 but not pull it in. systemd
54f874c5
LP
946 automatically adds
947 dependencies of type
948 <varname>After=</varname> for
949 this target unit to all SysV
950 init script service units with
951 an LSB header referring to the
952 <literal>$named</literal>
953 facility.</para>
954 </listitem>
955 </varlistentry>
956 <varlistentry>
957 <term><filename>nss-user-lookup.target</filename></term>
958 <listitem>
959 <para>A target that should be
960 used as synchronization point
961 for all user/group name
962 service lookups. Note that
963 this is independent of
964 host/network name lookups for
965 which
966 <filename>nss-lookup.target</filename>
51cb9d73
LP
967 should be used. All services
968 for which the availability of
969 the full user/group database is
970 essential should be ordered
971 after this target, but not
972 pull it in. Note that system
973 users are always resolvable,
974 and hence do not require any
975 special ordering against this
976 target.</para>
54f874c5
LP
977 </listitem>
978 </varlistentry>
979 <varlistentry>
980 <term><filename>remote-fs-pre.target</filename></term>
981 <listitem>
982 <para>This target unit is
983 automatically ordered before
984 all remote mount point units
985 (see above). It can be used to
986 run certain units before the
987 remote mounts are
988 established. Note that this
989 unit is generally not part of
990 the initial transaction,
991 unless the unit that wants to
992 be ordered before all remote
993 mounts pulls it in via a
994 <varname>Wants=</varname> type
995 dependency. If the unit wants
996 to be pulled in by the first
79640424 997 remote mount showing up, it
54f874c5 998 should use
8df31a9c 999 <filename>network-online.target</filename>
54f874c5 1000 (see above).</para>
54f874c5
LP
1001 </listitem>
1002 </varlistentry>
1003 <varlistentry>
1004 <term><filename>rpcbind.target</filename></term>
1005 <listitem>
51cb9d73
LP
1006 <para>The portmapper/rpcbind
1007 pulls in this target and
1008 orders itself before it, to
1009 indicate its
1010 availability. systemd
1011 automatically adds
1012 dependencies of type
54f874c5
LP
1013 <varname>After=</varname> for
1014 this target unit to all SysV
1015 init script service units with
1016 an LSB header referring to the
1017 <literal>$portmap</literal>
1018 facility.</para>
1019 </listitem>
1020 </varlistentry>
1021 <varlistentry>
1022 <term><filename>time-sync.target</filename></term>
1023 <listitem>
51cb9d73
LP
1024 <para>Services responsible for
1025 synchronizing the system clock
1026 from a remote source (such as
1027 NTP client implementations)
1028 should pull in this target and
1029 order themselves before
1030 it. All services where correct
1031 time is essential should be
1032 ordered after this unit, but
1033 not pull it in. systemd
1034 automatically adds
1035 dependencies of type
54f874c5
LP
1036 <varname>After=</varname> for
1037 this target unit to all SysV
1038 init script service units with
1039 an LSB header referring to the
1040 <literal>$time</literal>
51cb9d73 1041 facility. </para>
54f874c5
LP
1042 </listitem>
1043 </varlistentry>
9f235308
LP
1044 </variablelist>
1045 </refsect1>
1046
1047 <refsect1>
af2d49f7 1048 <title>Special User Units</title>
9f235308 1049
af2d49f7 1050 <para>When systemd runs as a user instance, the
9f235308
LP
1051 following special units are available, which have
1052 similar definitions as their system counterparts:
bd3d19a4 1053 <filename>default.target</filename>,
9f235308 1054 <filename>shutdown.target</filename>,
e06e62f4
LP
1055 <filename>sockets.target</filename>,
1056 <filename>timers.target</filename>,
1057 <filename>paths.target</filename>,
1058 <filename>bluetooth.target</filename>,
1059 <filename>printer.target</filename>,
1060 <filename>smartcard.target</filename>,
1061 <filename>sound.target</filename>.</para>
a1b256b0 1062
b040723e 1063 <para>In addition, the following special unit is
a1b256b0
LP
1064 understood only when systemd runs as service instance:</para>
1065
1066 <variablelist>
1067 <varlistentry>
0e0320e0 1068 <term><filename>exit.target</filename></term>
a1b256b0
LP
1069 <listitem>
1070 <para>A special service unit
1071 for shutting down the
af2d49f7 1072 user service manager.</para>
a1b256b0
LP
1073
1074 <para>Applications wanting to
af2d49f7
LP
1075 terminate the user service
1076 manager should start this
1077 unit. If systemd receives
05cc7267 1078 <constant>SIGTERM</constant> or <constant>SIGINT</constant> when running
79640424 1079 as user service daemon, it will
af2d49f7 1080 start this unit.</para>
a1b256b0
LP
1081
1082 <para>Normally, this pulls in
1083 <filename>shutdown.target</filename>
1084 which in turn should be
1085 conflicted by all units that
1086 want to be shut down on
af2d49f7 1087 user service manager exit.</para>
a1b256b0
LP
1088 </listitem>
1089 </varlistentry>
1090 </variablelist>
9f235308
LP
1091 </refsect1>
1092
fade1ec6
ZJS
1093 <refsect1>
1094 <title>Special Slice Units</title>
1095
1096 <para>There are four <literal>.slice</literal> units
1097 which form the basis of the hierarchy for assignment
1098 of resources for services, users, and virtual machines
1099 or containers.</para>
1100
1101 <variablelist>
1102 <varlistentry>
1103 <term><filename>-.slice</filename></term>
1104 <listitem>
1105 <para>The root slice is the
61ad59b1
LP
1106 root of the hierarchy. It
1107 usually does not contain units
1108 directly, but may be used to
1109 set defaults for the whole
1110 tree.</para>
fade1ec6
ZJS
1111 </listitem>
1112 </varlistentry>
1113
1114 <varlistentry>
1115 <term><filename>system.slice</filename></term>
1116 <listitem>
fbce1139 1117 <para>By default, all services
fade1ec6 1118 services started by
61ad59b1
LP
1119 <command>systemd</command> are
1120 found in this slice.</para>
fade1ec6
ZJS
1121 </listitem>
1122 </varlistentry>
1123
1124 <varlistentry>
1125 <term><filename>user.slice</filename></term>
1126 <listitem>
fbce1139 1127 <para>By default, all user
fade1ec6
ZJS
1128 processes and services started
1129 on behalf of the user,
1130 including the per-user systemd
61ad59b1
LP
1131 instance are found in this
1132 slice.</para>
fade1ec6
ZJS
1133 </listitem>
1134 </varlistentry>
1135
1136 <varlistentry>
1137 <term><filename>machine.slice</filename></term>
1138 <listitem>
08d555f3 1139 <para>By default, all virtual
61ad59b1
LP
1140 machines and containers
1141 registered with
1142 <command>systemd-machined</command>
1143 are found in this slice.
fade1ec6
ZJS
1144 </para>
1145 </listitem>
1146 </varlistentry>
1147 </variablelist>
1148 </refsect1>
1149
9f235308
LP
1150 <refsect1>
1151 <title>See Also</title>
1152 <para>
feb88c9f 1153 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
5dc50792
LP
1154 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1155 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1156 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
013d8a39 1157 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
fade1ec6 1158 <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
5aded369 1159 <citerefentry project='man-pages'><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
700e07ff 1160 <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
9f235308
LP
1161 </para>
1162 </refsect1>
1163
1164</refentry>