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>kbrequest.target</filename>,
68 <filename>kexec.target</filename>,
69 <filename>local-fs.target</filename>,
70 <filename>local-fs-pre.target</filename>,
71 <filename>mail-transfer-agent.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>rpcbind.target</filename>,
83 <filename>runlevel2.target</filename>,
84 <filename>runlevel3.target</filename>,
85 <filename>runlevel4.target</filename>,
86 <filename>runlevel5.target</filename>,
87 <filename>shutdown.target</filename>,
88 <filename>sigpwr.target</filename>,
89 <filename>sleep.target</filename>,
90 <filename>smartcard.target</filename>,
91 <filename>sockets.target</filename>,
92 <filename>sound.target</filename>,
93 <filename>suspend.target</filename>,
94 <filename>swap.target</filename>,
95 <filename>sysinit.target</filename>,
96 <filename>syslog.socket</filename>,
97 <filename>syslog.target</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
217 <para>systemd automatically
218 adds dependencies of type
219 After for this target unit to
220 all SysV init script service
221 units with a LSB header
223 <literal>$x-display-manager</literal>
228 <term><filename>emergency.target</filename></term>
230 <para>A special target unit
231 that starts an emergency
233 console. This unit is supposed
234 to be used with the kernel
236 <varname>systemd.unit=</varname>
237 and has otherwise little use.
242 <term><filename>final.target</filename></term>
244 <para>A special target unit
245 that is used during the
246 shutdown logic and may be used
247 to pull in late services after
248 all normal services are
249 already terminated and all
255 <term><filename>getty.target</filename></term>
257 <para>A special target unit
258 that pulls in all local TTY
259 <filename>getty</filename> instances.
264 <term><filename>graphical.target</filename></term>
266 <para>A special target unit
267 for setting up a graphical
268 login screen. This pulls in
269 <filename>multi-user.target</filename>.</para>
271 <para>Units that are needed
272 for graphical login shall add
273 Wants dependencies for their
274 unit to this unit (or
275 <filename>multi-user.target</filename>)
276 during installation.</para>
280 <term><filename>hibernate.target</filename></term>
282 <para>A special target unit
284 system. This pulls in
285 <filename>sleep.target</filename>.</para>
289 <term><filename>hybrid-sleep.target</filename></term>
291 <para>A special target unit
292 for hibernating and suspending the
293 system at the same time. This pulls in
294 <filename>sleep.target</filename>.</para>
298 <term><filename>halt.target</filename></term>
300 <para>A special target unit
301 for shutting down and halting the system.</para>
303 <para>Applications wanting to
304 halt the system should start
309 <term><filename>kbrequest.target</filename></term>
311 <para>systemd starts this
312 target whenever Alt+ArrowUp is
313 pressed on the console. This
314 is a good candidate to be
315 aliased (symlinked) to
316 <filename>rescue.target</filename>.</para>
320 <term><filename>kexec.target</filename></term>
322 <para>A special target unit
323 for shutting down and rebooting the system via kexec.</para>
325 <para>Applications wanting to
326 reboot the system with kexec should start
331 <term><filename>local-fs.target</filename></term>
333 <para>systemd automatically
334 adds dependencies of type
335 After to all mount units that
336 refer to local mount points
337 for this target unit. In
338 addition, systemd adds
339 dependencies of type Wants to
340 this target unit for those
342 <filename>/etc/fstab</filename>
344 <option>auto</option> and
345 <option>comment=systemd.mount</option>
346 mount options set.</para>
348 <para>systemd automatically
349 adds dependencies of type
350 After for this target unit to
351 all SysV init script service
352 units with an LSB header
354 <literal>$local_fs</literal>
359 <term><filename>local-fs-pre.target</filename></term>
361 <para>This target unit is
362 automatically ordered before
363 all local mount points marked
364 with <option>auto</option>
365 (see above). It can be used to
366 execute certain units before
367 all local mounts.</para>
371 <term><filename>mail-transfer-agent.target</filename></term>
373 <para>The mail transfer agent
374 (MTA) service. Usually this
375 should pull-in all units
377 sending/receiving mails on the
380 <para>systemd automatically
381 adds dependencies of type
382 After for this target unit to
383 all SysV init script service
384 units with an LSB header
386 <literal>$mail-transfer-agent</literal>.</para>
390 <term><filename>multi-user.target</filename></term>
392 <para>A special target unit
393 for setting up a multi-user
394 system (non-graphical). This
396 <filename>graphical.target</filename>.</para>
398 <para>Units that are needed
399 for a multi-user system shall
400 add Wants dependencies to
401 this unit for their unit during
406 <term><filename>network.target</filename></term>
408 <para>systemd automatically
409 adds dependencies of type
410 After for this target unit to
411 all SysV init script service
412 units with an LSB header
414 <literal>$network</literal>
419 <term><filename>nss-lookup.target</filename></term>
421 <para>A target that should be
422 used as synchronization point
423 for all host/network name
424 service lookups. Note that
425 this is independent of
426 user/group name lookups for
428 <filename>nss-user-lookup.target</filename>
429 should be used. systemd
431 dependencies of type After for
432 this target unit to all SysV
433 init script service units with
434 an LSB header referring to the
435 <literal>$named</literal>
440 <term><filename>nss-user-lookup.target</filename></term>
442 <para>A target that should be
443 used as synchronization point
444 for all user/group name
445 service lookups. Note that
446 this is independent of
447 host/network name lookups for
449 <filename>nss-lookup.target</filename>
450 should be used. </para>
454 <term><filename>poweroff.target</filename></term>
456 <para>A special target unit
457 for shutting down and powering off the system.</para>
459 <para>Applications wanting to
460 power off the system should start
463 <para><filename>runlevel0.target</filename>
464 is an alias for this target
465 unit, for compatibility with SysV.</para>
469 <term><filename>printer.target</filename></term>
471 <para>This target is started
472 automatically as soon as a
473 printer is plugged in or
479 <term><filename>reboot.target</filename></term>
481 <para>A special target unit
482 for shutting down and rebooting the system.</para>
484 <para>Applications wanting to
485 reboot the system should start
488 <para><filename>runlevel6.target</filename>
489 is an alias for this target
490 unit, for compatibility with SysV.</para>
494 <term><filename>remote-fs.target</filename></term>
497 <filename>local-fs.target</filename>,
501 <para>systemd automatically
502 adds dependencies of type
503 After for this target unit to
504 all SysV init script service
505 units with an LSB header
507 <literal>$remote_fs</literal>
512 <term><filename>remote-fs-pre.target</filename></term>
514 <para>This target unit is
515 automatically ordered before
516 all remote mount points marked
517 with <option>auto</option>
518 (see above). It can be used to
519 execute certain units before
520 all remote mounts.</para>
524 <term><filename>rescue.target</filename></term>
526 <para>A special target unit
527 for setting up the base system
528 and a rescue shell.</para>
530 <para><filename>runlevel1.target</filename>
531 is an alias for this target
532 unit, for compatibility with SysV.</para>
536 <term><filename>rpcbind.target</filename></term>
538 <para>systemd automatically
539 adds dependencies of type
540 After for this target unit to
541 all SysV init script service
542 units with an LSB header
544 <literal>$portmap</literal>
549 <term><filename>runlevel2.target</filename></term>
550 <term><filename>runlevel3.target</filename></term>
551 <term><filename>runlevel4.target</filename></term>
552 <term><filename>runlevel5.target</filename></term>
554 <para>These are targets that
555 are called whenever the SysV
556 compatibility code asks for
558 respectively. It is a good
559 idea to make this an alias for
561 <filename>multi-user.target</filename>
563 <filename>graphical.target</filename>
568 <term><filename>shutdown.target</filename></term>
570 <para>A special target unit
571 that terminates the services
572 on system shutdown.</para>
574 <para>Services that shall be
575 terminated on system shutdown
577 dependencies to this unit for
578 their service unit, which is
580 <varname>DefaultDependencies=yes</varname>
581 is set (the default).</para>
583 <para>systemd automatically
584 adds dependencies of type
585 Conflicts to this target unit
586 for all SysV init script
587 service units that shall be
588 terminated in SysV runlevels 0
593 <term><filename>sigpwr.target</filename></term>
595 <para>A special target that is
596 started when systemd receives
597 the SIGPWR process signal,
598 which is normally sent by the
599 kernel or UPS daemons when
604 <term><filename>sleep.target</filename></term>
606 <para>A special target unit
608 <filename>suspend.target</filename>,
609 <filename>hibernate.target</filename> and <filename>hybrid-sleep.target</filename>
610 and may be used to hook units
616 <term><filename>smartcard.target</filename></term>
618 <para>This target is started
619 automatically as soon as a
620 smartcard controller is
621 plugged in or becomes
622 available at boot.</para>
626 <term><filename>sockets.target</filename></term>
628 <para>A special target unit
629 that sets up all service
632 <para>Services that can be
633 socket-activated shall add
634 Wants dependencies to this
635 unit for their socket unit
636 during installation.</para>
640 <term><filename>sound.target</filename></term>
642 <para>This target is started
643 automatically as soon as a
644 sound card is plugged in or
650 <term><filename>suspend.target</filename></term>
652 <para>A special target unit
654 system. This pulls in
655 <filename>sleep.target</filename>.</para>
659 <term><filename>swap.target</filename></term>
662 <filename>local-fs.target</filename>, but for swap
668 <term><filename>sysinit.target</filename></term>
670 <para>A special target unit
671 covering early boot-up scripts.</para>
672 <para>systemd automatically
673 adds dependencies of the types
674 Wants and After for all
675 SysV service units configured
676 for runlevels that are not 0
677 to 6 to this target unit.
678 This covers the special
679 boot-up runlevels some
680 distributions have, such as S
685 <term><filename>syslog.socket</filename></term>
687 <para>The socket unit
688 syslog implementations should
689 listen on. All userspace log
690 messages will be made
691 available on this socket. For
692 more information about syslog
693 integration, please consult
695 url="http://www.freedesktop.org/wiki/Software/systemd/syslog">Syslog
701 <term><filename>syslog.target</filename></term>
703 <para>systemd automatically
704 adds dependencies of type
705 After for this target unit to
706 all SysV init script service
707 units with an LSB header
709 <literal>$syslog</literal>
714 <term><filename>system-update.target</filename></term>
716 <para>A special target unit
717 that is used for off-line
719 <citerefentry><refentrytitle>systemd-system-update-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
720 will redirect the boot process
722 <filename>/system-update</filename>
723 exists. For more information
725 url="http://freedesktop.org/wiki/Software/systemd/SystemUpdates">System
727 Specification</ulink>.</para>
731 <term><filename>time-sync.target</filename></term>
733 <para>systemd automatically
734 adds dependencies of type
735 After for this target unit to
736 all SysV init script service
737 units with an LSB header
739 <literal>$time</literal>
744 <term><filename>umount.target</filename></term>
746 <para>A special target unit
747 that umounts all mount and
748 automount points on system
751 <para>Mounts that shall be
752 unmounted on system shutdown
754 dependencies to this unit for
755 their mount unit, which is
757 <varname>DefaultDependencies=yes</varname>
758 is set (the default).</para>
766 <title>Special User Units</title>
768 <para>When systemd runs as a user instance, the
769 following special units are available, which have
770 similar definitions as their system counterparts:
771 <filename>default.target</filename>,
772 <filename>shutdown.target</filename>,
773 <filename>sockets.target</filename></para>
775 <para>In addition the following special unit is
776 understood only when systemd runs as service instance:</para>
780 <term><filename>exit.target</filename></term>
782 <para>A special service unit
783 for shutting down the
784 user service manager.</para>
786 <para>Applications wanting to
787 terminate the user service
788 manager should start this
789 unit. If systemd receives
790 SIGTERM or SIGINT when running
791 as user service daemon it will
792 start this unit.</para>
794 <para>Normally, this pulls in
795 <filename>shutdown.target</filename>
796 which in turn should be
797 conflicted by all units that
798 want to be shut down on
799 user service manager exit.</para>
806 <title>See Also</title>
808 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
809 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
810 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
811 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
812 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
813 <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>