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">
6 This file is part of systemd.
8 Copyright 2010 Lennart Poettering
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.
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.
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/>.
24 <refentry id="systemd.special">
27 <title>systemd.special</title>
28 <productname>systemd</productname>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
41 <refentrytitle>systemd.special</refentrytitle>
42 <manvolnum>7</manvolnum>
46 <refname>systemd.special</refname>
47 <refpurpose>Special systemd units</refpurpose>
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>dbus.service</filename>,
56 <filename>dbus.socket</filename>,
57 <filename>default.target</filename>,
58 <filename>display-manager.service</filename>,
59 <filename>emergency.target</filename>,
60 <filename>exit.target</filename>,
61 <filename>final.target</filename>,
62 <filename>getty.target</filename>,
63 <filename>graphical.target</filename>,
64 <filename>halt.target</filename>,
65 <filename>hibernate.target</filename>,
66 <filename>hybrid-sleep.target</filename>,
67 <filename>initrd-fs.target</filename>,
68 <filename>kbrequest.target</filename>,
69 <filename>kexec.target</filename>,
70 <filename>local-fs.target</filename>,
71 <filename>local-fs-pre.target</filename>,
72 <filename>multi-user.target</filename>,
73 <filename>network.target</filename>,
74 <filename>nss-lookup.target</filename>,
75 <filename>nss-user-lookup.target</filename>,
76 <filename>poweroff.target</filename>,
77 <filename>printer.target</filename>,
78 <filename>reboot.target</filename>,
79 <filename>remote-fs.target</filename>,
80 <filename>remote-fs-pre.target</filename>,
81 <filename>rescue.target</filename>,
82 <filename>initrd-root-fs.target</filename>,
83 <filename>rpcbind.target</filename>,
84 <filename>runlevel2.target</filename>,
85 <filename>runlevel3.target</filename>,
86 <filename>runlevel4.target</filename>,
87 <filename>runlevel5.target</filename>,
88 <filename>shutdown.target</filename>,
89 <filename>sigpwr.target</filename>,
90 <filename>sleep.target</filename>,
91 <filename>smartcard.target</filename>,
92 <filename>sockets.target</filename>,
93 <filename>sound.target</filename>,
94 <filename>suspend.target</filename>,
95 <filename>swap.target</filename>,
96 <filename>sysinit.target</filename>,
97 <filename>syslog.socket</filename>,
98 <filename>system-update.target</filename>,
99 <filename>time-sync.target</filename>,
100 <filename>umount.target</filename></para>
104 <title>Description</title>
106 <para>A few units are treated specially by
107 systemd. They have special internal semantics and
108 cannot be renamed.</para>
112 <title>Special System Units</title>
116 <term><filename>basic.target</filename></term>
118 <para>A special target unit
119 covering early boot-up.</para>
120 <para>systemd automatically
121 adds dependencies of the types
122 Requires and After for this
123 target unit to all SysV
124 service units configured for
125 runlevel 1 to 5.</para>
126 <para>Usually this should pull-in
127 all sockets, mount points,
128 swap devices and other basic
129 initialization necessary for
131 daemons. Most normal daemons
132 should have dependencies of
133 type After and Requires on
138 <term><filename>bluetooth.target</filename></term>
140 <para>This target is started
141 automatically as soon as a
142 bluetooth controller is
143 plugged in or becomes
144 available at boot.</para>
148 <term><filename>ctrl-alt-del.target</filename></term>
150 <para>systemd starts this
152 Control+Alt+Del is pressed on
153 the console. Usually this
154 should be aliased (symlinked)
156 <filename>reboot.target</filename>.</para>
160 <term><filename>cryptsetup.target</filename></term>
162 <para>A target that pulls in
163 setup services for all
169 <term><filename>dbus.service</filename></term>
171 <para>A special unit for the
172 D-Bus system bus. As soon as
173 this service is fully started
174 up systemd will connect to it
180 <term><filename>dbus.socket</filename></term>
182 <para>A special unit for the
183 D-Bus system bus socket. All
185 <literal>Type=dbus</literal>
192 <term><filename>default.target</filename></term>
194 <para>The default unit systemd
195 starts at bootup. Usually this
196 should be aliased (symlinked)
198 <filename>multi-user.target</filename>
200 <filename>graphical.target</filename>.</para>
201 <para>The default unit systemd
202 starts at bootup can be
204 <varname>systemd.unit=</varname>
205 kernel command line option.</para>
209 <term><filename>display-manager.service</filename></term>
211 <para>The display manager
212 service. Usually this should
213 be aliased (symlinked) to
214 <filename>gdm.service</filename>
215 or a similar display manager
220 <term><filename>emergency.target</filename></term>
222 <para>A special target unit
223 that starts an emergency
225 console. This unit is supposed
226 to be used with the kernel
228 <varname>systemd.unit=</varname>
229 and has otherwise little use.
234 <term><filename>final.target</filename></term>
236 <para>A special target unit
237 that is used during the
238 shutdown logic and may be used
239 to pull in late services after
240 all normal services are
241 already terminated and all
247 <term><filename>getty.target</filename></term>
249 <para>A special target unit
250 that pulls in all local TTY
251 <filename>getty</filename> instances.
256 <term><filename>graphical.target</filename></term>
258 <para>A special target unit
259 for setting up a graphical
260 login screen. This pulls in
261 <filename>multi-user.target</filename>.</para>
263 <para>Units that are needed
264 for graphical login shall add
265 Wants dependencies for their
266 unit to this unit (or
267 <filename>multi-user.target</filename>)
268 during installation.</para>
272 <term><filename>hibernate.target</filename></term>
274 <para>A special target unit
276 system. This pulls in
277 <filename>sleep.target</filename>.</para>
281 <term><filename>hybrid-sleep.target</filename></term>
283 <para>A special target unit
284 for hibernating and suspending the
285 system at the same time. This pulls in
286 <filename>sleep.target</filename>.</para>
290 <term><filename>halt.target</filename></term>
292 <para>A special target unit
293 for shutting down and halting the system.</para>
295 <para>Applications wanting to
296 halt the system should start
301 <term><filename>initrd-fs.target</filename></term>
303 <para>systemd automatically
304 adds dependencies of type
305 Before to sysroot-usr.mount and
306 all mount points fround in
307 <filename>/etc/fstab</filename>
309 <option>auto</option> and
310 <option>x-initrd.mount</option>
312 See also <literal>systemd-fstab-generator</literal>.
317 <term><filename>kbrequest.target</filename></term>
319 <para>systemd starts this
320 target whenever Alt+ArrowUp is
321 pressed on the console. This
322 is a good candidate to be
323 aliased (symlinked) to
324 <filename>rescue.target</filename>.</para>
328 <term><filename>kexec.target</filename></term>
330 <para>A special target unit
331 for shutting down and rebooting the system via kexec.</para>
333 <para>Applications wanting to
334 reboot the system with kexec should start
339 <term><filename>local-fs.target</filename></term>
341 <para>systemd automatically
342 adds dependencies of type
343 After to all mount units that
344 refer to local mount points
345 for this target unit. In
346 addition, systemd adds
347 dependencies of type Wants to
348 this target unit for those
350 <filename>/etc/fstab</filename>
352 <option>auto</option> and
353 <option>comment=systemd.mount</option>
354 mount options set.</para>
358 <term><filename>local-fs-pre.target</filename></term>
360 <para>This target unit is
361 automatically ordered before
362 all local mount points marked
363 with <option>auto</option>
364 (see above). It can be used to
365 execute certain units before
366 all local mounts.</para>
370 <term><filename>multi-user.target</filename></term>
372 <para>A special target unit
373 for setting up a multi-user
374 system (non-graphical). This
376 <filename>graphical.target</filename>.</para>
378 <para>Units that are needed
379 for a multi-user system shall
380 add Wants dependencies to
381 this unit for their unit during
386 <term><filename>network.target</filename></term>
388 <para>systemd automatically
389 adds dependencies of type
390 After for this target unit to
391 all SysV init script service
392 units with an LSB header
394 <literal>$network</literal>
397 <para>This unit is supposed to
398 indicate when the network is
399 "up", but it is only very
400 loosely defined what that is
401 supposed to mean. Also see <ulink
402 url="http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget">Running
403 Services After the Network is
409 <term><filename>nss-lookup.target</filename></term>
411 <para>A target that should be
412 used as synchronization point
413 for all host/network name
414 service lookups. Note that
415 this is independent of
416 user/group name lookups for
418 <filename>nss-user-lookup.target</filename>
419 should be used. systemd
421 dependencies of type After for
422 this target unit to all SysV
423 init script service units with
424 an LSB header referring to the
425 <literal>$named</literal>
430 <term><filename>nss-user-lookup.target</filename></term>
432 <para>A target that should be
433 used as synchronization point
434 for all user/group name
435 service lookups. Note that
436 this is independent of
437 host/network name lookups for
439 <filename>nss-lookup.target</filename>
440 should be used. </para>
444 <term><filename>poweroff.target</filename></term>
446 <para>A special target unit
447 for shutting down and powering off the system.</para>
449 <para>Applications wanting to
450 power off the system should start
453 <para><filename>runlevel0.target</filename>
454 is an alias for this target
455 unit, for compatibility with SysV.</para>
459 <term><filename>printer.target</filename></term>
461 <para>This target is started
462 automatically as soon as a
463 printer is plugged in or
469 <term><filename>reboot.target</filename></term>
471 <para>A special target unit
472 for shutting down and rebooting the system.</para>
474 <para>Applications wanting to
475 reboot the system should start
478 <para><filename>runlevel6.target</filename>
479 is an alias for this target
480 unit, for compatibility with SysV.</para>
484 <term><filename>remote-fs.target</filename></term>
487 <filename>local-fs.target</filename>,
491 <para>systemd automatically
492 adds dependencies of type
493 After for this target unit to
494 all SysV init script service
495 units with an LSB header
497 <literal>$remote_fs</literal>
502 <term><filename>remote-fs-pre.target</filename></term>
504 <para>This target unit is
505 automatically ordered before
506 all remote mount points marked
507 with <option>auto</option>
508 (see above). It can be used to
509 execute certain units before
510 all remote mounts.</para>
514 <term><filename>rescue.target</filename></term>
516 <para>A special target unit
517 for setting up the base system
518 and a rescue shell.</para>
520 <para><filename>runlevel1.target</filename>
521 is an alias for this target
522 unit, for compatibility with SysV.</para>
526 <term><filename>initrd-root-fs.target</filename></term>
528 <para>systemd automatically
529 adds dependencies of type
530 Before to the sysroot.mount unit,
531 which is generated from the kernel command
532 line by the <literal>systemd-fstab-generator</literal>.
537 <term><filename>rpcbind.target</filename></term>
539 <para>systemd automatically
540 adds dependencies of type
541 After for this target unit to
542 all SysV init script service
543 units with an LSB header
545 <literal>$portmap</literal>
550 <term><filename>runlevel2.target</filename></term>
551 <term><filename>runlevel3.target</filename></term>
552 <term><filename>runlevel4.target</filename></term>
553 <term><filename>runlevel5.target</filename></term>
555 <para>These are targets that
556 are called whenever the SysV
557 compatibility code asks for
559 respectively. It is a good
560 idea to make this an alias for
562 <filename>multi-user.target</filename>
564 <filename>graphical.target</filename>
569 <term><filename>shutdown.target</filename></term>
571 <para>A special target unit
572 that terminates the services
573 on system shutdown.</para>
575 <para>Services that shall be
576 terminated on system shutdown
578 dependencies to this unit for
579 their service unit, which is
581 <varname>DefaultDependencies=yes</varname>
582 is set (the default).</para>
584 <para>systemd automatically
585 adds dependencies of type
586 Conflicts to this target unit
587 for all SysV init script
588 service units that shall be
589 terminated in SysV runlevels 0
594 <term><filename>sigpwr.target</filename></term>
596 <para>A special target that is
597 started when systemd receives
598 the SIGPWR process signal,
599 which is normally sent by the
600 kernel or UPS daemons when
605 <term><filename>sleep.target</filename></term>
607 <para>A special target unit
609 <filename>suspend.target</filename>,
610 <filename>hibernate.target</filename> and <filename>hybrid-sleep.target</filename>
611 and may be used to hook units
617 <term><filename>smartcard.target</filename></term>
619 <para>This target is started
620 automatically as soon as a
621 smartcard controller is
622 plugged in or becomes
623 available at boot.</para>
627 <term><filename>sockets.target</filename></term>
629 <para>A special target unit
630 that sets up all service
633 <para>Services that can be
634 socket-activated shall add
635 Wants dependencies to this
636 unit for their socket unit
637 during installation.</para>
641 <term><filename>sound.target</filename></term>
643 <para>This target is started
644 automatically as soon as a
645 sound card is plugged in or
651 <term><filename>suspend.target</filename></term>
653 <para>A special target unit
655 system. This pulls in
656 <filename>sleep.target</filename>.</para>
660 <term><filename>swap.target</filename></term>
663 <filename>local-fs.target</filename>, but for swap
669 <term><filename>sysinit.target</filename></term>
671 <para>A special target unit
672 covering early boot-up scripts.</para>
676 <term><filename>syslog.socket</filename></term>
678 <para>The socket unit
679 syslog implementations should
680 listen on. All userspace log
681 messages will be made
682 available on this socket. For
683 more information about syslog
684 integration, please consult
686 url="http://www.freedesktop.org/wiki/Software/systemd/syslog">Syslog
692 <term><filename>system-update.target</filename></term>
694 <para>A special target unit
695 that is used for off-line
697 <citerefentry><refentrytitle>systemd-system-update-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
698 will redirect the boot process
700 <filename>/system-update</filename>
701 exists. For more information
703 url="http://freedesktop.org/wiki/Software/systemd/SystemUpdates">System
705 Specification</ulink>.</para>
709 <term><filename>time-sync.target</filename></term>
711 <para>systemd automatically
712 adds dependencies of type
713 After for this target unit to
714 all SysV init script service
715 units with an LSB header
717 <literal>$time</literal>
722 <term><filename>umount.target</filename></term>
724 <para>A special target unit
725 that umounts all mount and
726 automount points on system
729 <para>Mounts that shall be
730 unmounted on system shutdown
732 dependencies to this unit for
733 their mount unit, which is
735 <varname>DefaultDependencies=yes</varname>
736 is set (the default).</para>
744 <title>Special User Units</title>
746 <para>When systemd runs as a user instance, the
747 following special units are available, which have
748 similar definitions as their system counterparts:
749 <filename>default.target</filename>,
750 <filename>shutdown.target</filename>,
751 <filename>sockets.target</filename></para>
753 <para>In addition the following special unit is
754 understood only when systemd runs as service instance:</para>
758 <term><filename>exit.target</filename></term>
760 <para>A special service unit
761 for shutting down the
762 user service manager.</para>
764 <para>Applications wanting to
765 terminate the user service
766 manager should start this
767 unit. If systemd receives
768 SIGTERM or SIGINT when running
769 as user service daemon it will
770 start this unit.</para>
772 <para>Normally, this pulls in
773 <filename>shutdown.target</filename>
774 which in turn should be
775 conflicted by all units that
776 want to be shut down on
777 user service manager exit.</para>
784 <title>See Also</title>
786 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
787 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
788 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
789 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
790 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
791 <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>
792 <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>