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>multi-user.target</filename>,
72 <filename>network.target</filename>,
73 <filename>nss-lookup.target</filename>,
74 <filename>nss-user-lookup.target</filename>,
75 <filename>poweroff.target</filename>,
76 <filename>printer.target</filename>,
77 <filename>reboot.target</filename>,
78 <filename>remote-fs.target</filename>,
79 <filename>remote-fs-pre.target</filename>,
80 <filename>rescue.target</filename>,
81 <filename>rpcbind.target</filename>,
82 <filename>runlevel2.target</filename>,
83 <filename>runlevel3.target</filename>,
84 <filename>runlevel4.target</filename>,
85 <filename>runlevel5.target</filename>,
86 <filename>shutdown.target</filename>,
87 <filename>sigpwr.target</filename>,
88 <filename>sleep.target</filename>,
89 <filename>smartcard.target</filename>,
90 <filename>sockets.target</filename>,
91 <filename>sound.target</filename>,
92 <filename>suspend.target</filename>,
93 <filename>swap.target</filename>,
94 <filename>sysinit.target</filename>,
95 <filename>syslog.socket</filename>,
96 <filename>syslog.target</filename>,
97 <filename>system-update.target</filename>,
98 <filename>time-sync.target</filename>,
99 <filename>umount.target</filename></para>
103 <title>Description</title>
105 <para>A few units are treated specially by
106 systemd. They have special internal semantics and
107 cannot be renamed.</para>
111 <title>Special System Units</title>
115 <term><filename>basic.target</filename></term>
117 <para>A special target unit
118 covering early boot-up.</para>
119 <para>systemd automatically
120 adds dependencies of the types
121 Requires and After for this
122 target unit to all SysV
123 service units configured for
124 runlevel 1 to 5.</para>
125 <para>Usually this should pull-in
126 all sockets, mount points,
127 swap devices and other basic
128 initialization necessary for
130 daemons. Most normal daemons
131 should have dependencies of
132 type After and Requires on
137 <term><filename>bluetooth.target</filename></term>
139 <para>This target is started
140 automatically as soon as a
141 bluetooth controller is
142 plugged in or becomes
143 available at boot.</para>
147 <term><filename>ctrl-alt-del.target</filename></term>
149 <para>systemd starts this
151 Control+Alt+Del is pressed on
152 the console. Usually this
153 should be aliased (symlinked)
155 <filename>reboot.target</filename>.</para>
159 <term><filename>cryptsetup.target</filename></term>
161 <para>A target that pulls in
162 setup services for all
168 <term><filename>dbus.service</filename></term>
170 <para>A special unit for the
171 D-Bus system bus. As soon as
172 this service is fully started
173 up systemd will connect to it
179 <term><filename>dbus.socket</filename></term>
181 <para>A special unit for the
182 D-Bus system bus socket. All
184 <literal>Type=dbus</literal>
191 <term><filename>default.target</filename></term>
193 <para>The default unit systemd
194 starts at bootup. Usually this
195 should be aliased (symlinked)
197 <filename>multi-user.target</filename>
199 <filename>graphical.target</filename>.</para>
200 <para>The default unit systemd
201 starts at bootup can be
203 <varname>systemd.unit=</varname>
204 kernel command line option.</para>
208 <term><filename>display-manager.service</filename></term>
210 <para>The display manager
211 service. Usually this should
212 be aliased (symlinked) to
213 <filename>gdm.service</filename>
214 or a similar display manager
219 <term><filename>emergency.target</filename></term>
221 <para>A special target unit
222 that starts an emergency
224 console. This unit is supposed
225 to be used with the kernel
227 <varname>systemd.unit=</varname>
228 and has otherwise little use.
233 <term><filename>final.target</filename></term>
235 <para>A special target unit
236 that is used during the
237 shutdown logic and may be used
238 to pull in late services after
239 all normal services are
240 already terminated and all
246 <term><filename>getty.target</filename></term>
248 <para>A special target unit
249 that pulls in all local TTY
250 <filename>getty</filename> instances.
255 <term><filename>graphical.target</filename></term>
257 <para>A special target unit
258 for setting up a graphical
259 login screen. This pulls in
260 <filename>multi-user.target</filename>.</para>
262 <para>Units that are needed
263 for graphical login shall add
264 Wants dependencies for their
265 unit to this unit (or
266 <filename>multi-user.target</filename>)
267 during installation.</para>
271 <term><filename>hibernate.target</filename></term>
273 <para>A special target unit
275 system. This pulls in
276 <filename>sleep.target</filename>.</para>
280 <term><filename>hybrid-sleep.target</filename></term>
282 <para>A special target unit
283 for hibernating and suspending the
284 system at the same time. This pulls in
285 <filename>sleep.target</filename>.</para>
289 <term><filename>halt.target</filename></term>
291 <para>A special target unit
292 for shutting down and halting the system.</para>
294 <para>Applications wanting to
295 halt the system should start
300 <term><filename>kbrequest.target</filename></term>
302 <para>systemd starts this
303 target whenever Alt+ArrowUp is
304 pressed on the console. This
305 is a good candidate to be
306 aliased (symlinked) to
307 <filename>rescue.target</filename>.</para>
311 <term><filename>kexec.target</filename></term>
313 <para>A special target unit
314 for shutting down and rebooting the system via kexec.</para>
316 <para>Applications wanting to
317 reboot the system with kexec should start
322 <term><filename>local-fs.target</filename></term>
324 <para>systemd automatically
325 adds dependencies of type
326 After to all mount units that
327 refer to local mount points
328 for this target unit. In
329 addition, systemd adds
330 dependencies of type Wants to
331 this target unit for those
333 <filename>/etc/fstab</filename>
335 <option>auto</option> and
336 <option>comment=systemd.mount</option>
337 mount options set.</para>
339 <para>systemd automatically
340 adds dependencies of type
341 After for this target unit to
342 all SysV init script service
343 units with an LSB header
345 <literal>$local_fs</literal>
350 <term><filename>local-fs-pre.target</filename></term>
352 <para>This target unit is
353 automatically ordered before
354 all local mount points marked
355 with <option>auto</option>
356 (see above). It can be used to
357 execute certain units before
358 all local mounts.</para>
362 <term><filename>multi-user.target</filename></term>
364 <para>A special target unit
365 for setting up a multi-user
366 system (non-graphical). This
368 <filename>graphical.target</filename>.</para>
370 <para>Units that are needed
371 for a multi-user system shall
372 add Wants dependencies to
373 this unit for their unit during
378 <term><filename>network.target</filename></term>
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>$network</literal>
389 <para>This unit is supposed to
390 indicate when the network is
391 "up", but it is only very
392 losely defined what that is
393 supposed to mean. Also see <ulink
394 url="http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget">Running
395 Services After the Network is
401 <term><filename>nss-lookup.target</filename></term>
403 <para>A target that should be
404 used as synchronization point
405 for all host/network name
406 service lookups. Note that
407 this is independent of
408 user/group name lookups for
410 <filename>nss-user-lookup.target</filename>
411 should be used. systemd
413 dependencies of type After for
414 this target unit to all SysV
415 init script service units with
416 an LSB header referring to the
417 <literal>$named</literal>
422 <term><filename>nss-user-lookup.target</filename></term>
424 <para>A target that should be
425 used as synchronization point
426 for all user/group name
427 service lookups. Note that
428 this is independent of
429 host/network name lookups for
431 <filename>nss-lookup.target</filename>
432 should be used. </para>
436 <term><filename>poweroff.target</filename></term>
438 <para>A special target unit
439 for shutting down and powering off the system.</para>
441 <para>Applications wanting to
442 power off the system should start
445 <para><filename>runlevel0.target</filename>
446 is an alias for this target
447 unit, for compatibility with SysV.</para>
451 <term><filename>printer.target</filename></term>
453 <para>This target is started
454 automatically as soon as a
455 printer is plugged in or
461 <term><filename>reboot.target</filename></term>
463 <para>A special target unit
464 for shutting down and rebooting the system.</para>
466 <para>Applications wanting to
467 reboot the system should start
470 <para><filename>runlevel6.target</filename>
471 is an alias for this target
472 unit, for compatibility with SysV.</para>
476 <term><filename>remote-fs.target</filename></term>
479 <filename>local-fs.target</filename>,
483 <para>systemd automatically
484 adds dependencies of type
485 After for this target unit to
486 all SysV init script service
487 units with an LSB header
489 <literal>$remote_fs</literal>
494 <term><filename>remote-fs-pre.target</filename></term>
496 <para>This target unit is
497 automatically ordered before
498 all remote mount points marked
499 with <option>auto</option>
500 (see above). It can be used to
501 execute certain units before
502 all remote mounts.</para>
506 <term><filename>rescue.target</filename></term>
508 <para>A special target unit
509 for setting up the base system
510 and a rescue shell.</para>
512 <para><filename>runlevel1.target</filename>
513 is an alias for this target
514 unit, for compatibility with SysV.</para>
518 <term><filename>rpcbind.target</filename></term>
520 <para>systemd automatically
521 adds dependencies of type
522 After for this target unit to
523 all SysV init script service
524 units with an LSB header
526 <literal>$portmap</literal>
531 <term><filename>runlevel2.target</filename></term>
532 <term><filename>runlevel3.target</filename></term>
533 <term><filename>runlevel4.target</filename></term>
534 <term><filename>runlevel5.target</filename></term>
536 <para>These are targets that
537 are called whenever the SysV
538 compatibility code asks for
540 respectively. It is a good
541 idea to make this an alias for
543 <filename>multi-user.target</filename>
545 <filename>graphical.target</filename>
550 <term><filename>shutdown.target</filename></term>
552 <para>A special target unit
553 that terminates the services
554 on system shutdown.</para>
556 <para>Services that shall be
557 terminated on system shutdown
559 dependencies to this unit for
560 their service unit, which is
562 <varname>DefaultDependencies=yes</varname>
563 is set (the default).</para>
565 <para>systemd automatically
566 adds dependencies of type
567 Conflicts to this target unit
568 for all SysV init script
569 service units that shall be
570 terminated in SysV runlevels 0
575 <term><filename>sigpwr.target</filename></term>
577 <para>A special target that is
578 started when systemd receives
579 the SIGPWR process signal,
580 which is normally sent by the
581 kernel or UPS daemons when
586 <term><filename>sleep.target</filename></term>
588 <para>A special target unit
590 <filename>suspend.target</filename>,
591 <filename>hibernate.target</filename> and <filename>hybrid-sleep.target</filename>
592 and may be used to hook units
598 <term><filename>smartcard.target</filename></term>
600 <para>This target is started
601 automatically as soon as a
602 smartcard controller is
603 plugged in or becomes
604 available at boot.</para>
608 <term><filename>sockets.target</filename></term>
610 <para>A special target unit
611 that sets up all service
614 <para>Services that can be
615 socket-activated shall add
616 Wants dependencies to this
617 unit for their socket unit
618 during installation.</para>
622 <term><filename>sound.target</filename></term>
624 <para>This target is started
625 automatically as soon as a
626 sound card is plugged in or
632 <term><filename>suspend.target</filename></term>
634 <para>A special target unit
636 system. This pulls in
637 <filename>sleep.target</filename>.</para>
641 <term><filename>swap.target</filename></term>
644 <filename>local-fs.target</filename>, but for swap
650 <term><filename>sysinit.target</filename></term>
652 <para>A special target unit
653 covering early boot-up scripts.</para>
654 <para>systemd automatically
655 adds dependencies of the types
656 Wants and After for all
657 SysV service units configured
658 for runlevels that are not 0
659 to 6 to this target unit.
660 This covers the special
661 boot-up runlevels some
662 distributions have, such as S
667 <term><filename>syslog.socket</filename></term>
669 <para>The socket unit
670 syslog implementations should
671 listen on. All userspace log
672 messages will be made
673 available on this socket. For
674 more information about syslog
675 integration, please consult
677 url="http://www.freedesktop.org/wiki/Software/systemd/syslog">Syslog
683 <term><filename>syslog.target</filename></term>
685 <para>systemd automatically
686 adds dependencies of type
687 After for this target unit to
688 all SysV init script service
689 units with an LSB header
691 <literal>$syslog</literal>
696 <term><filename>system-update.target</filename></term>
698 <para>A special target unit
699 that is used for off-line
701 <citerefentry><refentrytitle>systemd-system-update-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
702 will redirect the boot process
704 <filename>/system-update</filename>
705 exists. For more information
707 url="http://freedesktop.org/wiki/Software/systemd/SystemUpdates">System
709 Specification</ulink>.</para>
713 <term><filename>time-sync.target</filename></term>
715 <para>systemd automatically
716 adds dependencies of type
717 After for this target unit to
718 all SysV init script service
719 units with an LSB header
721 <literal>$time</literal>
726 <term><filename>umount.target</filename></term>
728 <para>A special target unit
729 that umounts all mount and
730 automount points on system
733 <para>Mounts that shall be
734 unmounted on system shutdown
736 dependencies to this unit for
737 their mount unit, which is
739 <varname>DefaultDependencies=yes</varname>
740 is set (the default).</para>
748 <title>Special User Units</title>
750 <para>When systemd runs as a user instance, the
751 following special units are available, which have
752 similar definitions as their system counterparts:
753 <filename>default.target</filename>,
754 <filename>shutdown.target</filename>,
755 <filename>sockets.target</filename></para>
757 <para>In addition the following special unit is
758 understood only when systemd runs as service instance:</para>
762 <term><filename>exit.target</filename></term>
764 <para>A special service unit
765 for shutting down the
766 user service manager.</para>
768 <para>Applications wanting to
769 terminate the user service
770 manager should start this
771 unit. If systemd receives
772 SIGTERM or SIGINT when running
773 as user service daemon it will
774 start this unit.</para>
776 <para>Normally, this pulls in
777 <filename>shutdown.target</filename>
778 which in turn should be
779 conflicted by all units that
780 want to be shut down on
781 user service manager exit.</para>
788 <title>See Also</title>
790 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
791 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
792 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
793 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
794 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
795 <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>