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>
417 <para>This unit is supposed to
418 indicate when the network is
419 "up", but it is only very
420 losely defined what that is
421 supposed to mean. Also see <ulink
422 url="http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget">Running
423 Services After the Network is
429 <term><filename>nss-lookup.target</filename></term>
431 <para>A target that should be
432 used as synchronization point
433 for all host/network name
434 service lookups. Note that
435 this is independent of
436 user/group name lookups for
438 <filename>nss-user-lookup.target</filename>
439 should be used. systemd
441 dependencies of type After for
442 this target unit to all SysV
443 init script service units with
444 an LSB header referring to the
445 <literal>$named</literal>
450 <term><filename>nss-user-lookup.target</filename></term>
452 <para>A target that should be
453 used as synchronization point
454 for all user/group name
455 service lookups. Note that
456 this is independent of
457 host/network name lookups for
459 <filename>nss-lookup.target</filename>
460 should be used. </para>
464 <term><filename>poweroff.target</filename></term>
466 <para>A special target unit
467 for shutting down and powering off the system.</para>
469 <para>Applications wanting to
470 power off the system should start
473 <para><filename>runlevel0.target</filename>
474 is an alias for this target
475 unit, for compatibility with SysV.</para>
479 <term><filename>printer.target</filename></term>
481 <para>This target is started
482 automatically as soon as a
483 printer is plugged in or
489 <term><filename>reboot.target</filename></term>
491 <para>A special target unit
492 for shutting down and rebooting the system.</para>
494 <para>Applications wanting to
495 reboot the system should start
498 <para><filename>runlevel6.target</filename>
499 is an alias for this target
500 unit, for compatibility with SysV.</para>
504 <term><filename>remote-fs.target</filename></term>
507 <filename>local-fs.target</filename>,
511 <para>systemd automatically
512 adds dependencies of type
513 After for this target unit to
514 all SysV init script service
515 units with an LSB header
517 <literal>$remote_fs</literal>
522 <term><filename>remote-fs-pre.target</filename></term>
524 <para>This target unit is
525 automatically ordered before
526 all remote mount points marked
527 with <option>auto</option>
528 (see above). It can be used to
529 execute certain units before
530 all remote mounts.</para>
534 <term><filename>rescue.target</filename></term>
536 <para>A special target unit
537 for setting up the base system
538 and a rescue shell.</para>
540 <para><filename>runlevel1.target</filename>
541 is an alias for this target
542 unit, for compatibility with SysV.</para>
546 <term><filename>rpcbind.target</filename></term>
548 <para>systemd automatically
549 adds dependencies of type
550 After for this target unit to
551 all SysV init script service
552 units with an LSB header
554 <literal>$portmap</literal>
559 <term><filename>runlevel2.target</filename></term>
560 <term><filename>runlevel3.target</filename></term>
561 <term><filename>runlevel4.target</filename></term>
562 <term><filename>runlevel5.target</filename></term>
564 <para>These are targets that
565 are called whenever the SysV
566 compatibility code asks for
568 respectively. It is a good
569 idea to make this an alias for
571 <filename>multi-user.target</filename>
573 <filename>graphical.target</filename>
578 <term><filename>shutdown.target</filename></term>
580 <para>A special target unit
581 that terminates the services
582 on system shutdown.</para>
584 <para>Services that shall be
585 terminated on system shutdown
587 dependencies to this unit for
588 their service unit, which is
590 <varname>DefaultDependencies=yes</varname>
591 is set (the default).</para>
593 <para>systemd automatically
594 adds dependencies of type
595 Conflicts to this target unit
596 for all SysV init script
597 service units that shall be
598 terminated in SysV runlevels 0
603 <term><filename>sigpwr.target</filename></term>
605 <para>A special target that is
606 started when systemd receives
607 the SIGPWR process signal,
608 which is normally sent by the
609 kernel or UPS daemons when
614 <term><filename>sleep.target</filename></term>
616 <para>A special target unit
618 <filename>suspend.target</filename>,
619 <filename>hibernate.target</filename> and <filename>hybrid-sleep.target</filename>
620 and may be used to hook units
626 <term><filename>smartcard.target</filename></term>
628 <para>This target is started
629 automatically as soon as a
630 smartcard controller is
631 plugged in or becomes
632 available at boot.</para>
636 <term><filename>sockets.target</filename></term>
638 <para>A special target unit
639 that sets up all service
642 <para>Services that can be
643 socket-activated shall add
644 Wants dependencies to this
645 unit for their socket unit
646 during installation.</para>
650 <term><filename>sound.target</filename></term>
652 <para>This target is started
653 automatically as soon as a
654 sound card is plugged in or
660 <term><filename>suspend.target</filename></term>
662 <para>A special target unit
664 system. This pulls in
665 <filename>sleep.target</filename>.</para>
669 <term><filename>swap.target</filename></term>
672 <filename>local-fs.target</filename>, but for swap
678 <term><filename>sysinit.target</filename></term>
680 <para>A special target unit
681 covering early boot-up scripts.</para>
682 <para>systemd automatically
683 adds dependencies of the types
684 Wants and After for all
685 SysV service units configured
686 for runlevels that are not 0
687 to 6 to this target unit.
688 This covers the special
689 boot-up runlevels some
690 distributions have, such as S
695 <term><filename>syslog.socket</filename></term>
697 <para>The socket unit
698 syslog implementations should
699 listen on. All userspace log
700 messages will be made
701 available on this socket. For
702 more information about syslog
703 integration, please consult
705 url="http://www.freedesktop.org/wiki/Software/systemd/syslog">Syslog
711 <term><filename>syslog.target</filename></term>
713 <para>systemd automatically
714 adds dependencies of type
715 After for this target unit to
716 all SysV init script service
717 units with an LSB header
719 <literal>$syslog</literal>
724 <term><filename>system-update.target</filename></term>
726 <para>A special target unit
727 that is used for off-line
729 <citerefentry><refentrytitle>systemd-system-update-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
730 will redirect the boot process
732 <filename>/system-update</filename>
733 exists. For more information
735 url="http://freedesktop.org/wiki/Software/systemd/SystemUpdates">System
737 Specification</ulink>.</para>
741 <term><filename>time-sync.target</filename></term>
743 <para>systemd automatically
744 adds dependencies of type
745 After for this target unit to
746 all SysV init script service
747 units with an LSB header
749 <literal>$time</literal>
754 <term><filename>umount.target</filename></term>
756 <para>A special target unit
757 that umounts all mount and
758 automount points on system
761 <para>Mounts that shall be
762 unmounted on system shutdown
764 dependencies to this unit for
765 their mount unit, which is
767 <varname>DefaultDependencies=yes</varname>
768 is set (the default).</para>
776 <title>Special User Units</title>
778 <para>When systemd runs as a user instance, the
779 following special units are available, which have
780 similar definitions as their system counterparts:
781 <filename>default.target</filename>,
782 <filename>shutdown.target</filename>,
783 <filename>sockets.target</filename></para>
785 <para>In addition the following special unit is
786 understood only when systemd runs as service instance:</para>
790 <term><filename>exit.target</filename></term>
792 <para>A special service unit
793 for shutting down the
794 user service manager.</para>
796 <para>Applications wanting to
797 terminate the user service
798 manager should start this
799 unit. If systemd receives
800 SIGTERM or SIGINT when running
801 as user service daemon it will
802 start this unit.</para>
804 <para>Normally, this pulls in
805 <filename>shutdown.target</filename>
806 which in turn should be
807 conflicted by all units that
808 want to be shut down on
809 user service manager exit.</para>
816 <title>See Also</title>
818 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
819 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
820 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
821 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
822 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
823 <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>