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>system-update.target</filename>,
97 <filename>time-sync.target</filename>,
98 <filename>umount.target</filename></para>
102 <title>Description</title>
104 <para>A few units are treated specially by
105 systemd. They have special internal semantics and
106 cannot be renamed.</para>
110 <title>Special System Units</title>
114 <term><filename>basic.target</filename></term>
116 <para>A special target unit
117 covering early boot-up.</para>
118 <para>systemd automatically
119 adds dependencies of the types
120 Requires and After for this
121 target unit to all SysV
122 service units configured for
123 runlevel 1 to 5.</para>
124 <para>Usually this should pull-in
125 all sockets, mount points,
126 swap devices and other basic
127 initialization necessary for
129 daemons. Most normal daemons
130 should have dependencies of
131 type After and Requires on
136 <term><filename>bluetooth.target</filename></term>
138 <para>This target is started
139 automatically as soon as a
140 bluetooth controller is
141 plugged in or becomes
142 available at boot.</para>
146 <term><filename>ctrl-alt-del.target</filename></term>
148 <para>systemd starts this
150 Control+Alt+Del is pressed on
151 the console. Usually this
152 should be aliased (symlinked)
154 <filename>reboot.target</filename>.</para>
158 <term><filename>cryptsetup.target</filename></term>
160 <para>A target that pulls in
161 setup services for all
167 <term><filename>dbus.service</filename></term>
169 <para>A special unit for the
170 D-Bus system bus. As soon as
171 this service is fully started
172 up systemd will connect to it
178 <term><filename>dbus.socket</filename></term>
180 <para>A special unit for the
181 D-Bus system bus socket. All
183 <literal>Type=dbus</literal>
190 <term><filename>default.target</filename></term>
192 <para>The default unit systemd
193 starts at bootup. Usually this
194 should be aliased (symlinked)
196 <filename>multi-user.target</filename>
198 <filename>graphical.target</filename>.</para>
199 <para>The default unit systemd
200 starts at bootup can be
202 <varname>systemd.unit=</varname>
203 kernel command line option.</para>
207 <term><filename>display-manager.service</filename></term>
209 <para>The display manager
210 service. Usually this should
211 be aliased (symlinked) to
212 <filename>gdm.service</filename>
213 or a similar display manager
218 <term><filename>emergency.target</filename></term>
220 <para>A special target unit
221 that starts an emergency
223 console. This unit is supposed
224 to be used with the kernel
226 <varname>systemd.unit=</varname>
227 and has otherwise little use.
232 <term><filename>final.target</filename></term>
234 <para>A special target unit
235 that is used during the
236 shutdown logic and may be used
237 to pull in late services after
238 all normal services are
239 already terminated and all
245 <term><filename>getty.target</filename></term>
247 <para>A special target unit
248 that pulls in all local TTY
249 <filename>getty</filename> instances.
254 <term><filename>graphical.target</filename></term>
256 <para>A special target unit
257 for setting up a graphical
258 login screen. This pulls in
259 <filename>multi-user.target</filename>.</para>
261 <para>Units that are needed
262 for graphical login shall add
263 Wants dependencies for their
264 unit to this unit (or
265 <filename>multi-user.target</filename>)
266 during installation.</para>
270 <term><filename>hibernate.target</filename></term>
272 <para>A special target unit
274 system. This pulls in
275 <filename>sleep.target</filename>.</para>
279 <term><filename>hybrid-sleep.target</filename></term>
281 <para>A special target unit
282 for hibernating and suspending the
283 system at the same time. This pulls in
284 <filename>sleep.target</filename>.</para>
288 <term><filename>halt.target</filename></term>
290 <para>A special target unit
291 for shutting down and halting the system.</para>
293 <para>Applications wanting to
294 halt the system should start
299 <term><filename>kbrequest.target</filename></term>
301 <para>systemd starts this
302 target whenever Alt+ArrowUp is
303 pressed on the console. This
304 is a good candidate to be
305 aliased (symlinked) to
306 <filename>rescue.target</filename>.</para>
310 <term><filename>kexec.target</filename></term>
312 <para>A special target unit
313 for shutting down and rebooting the system via kexec.</para>
315 <para>Applications wanting to
316 reboot the system with kexec should start
321 <term><filename>local-fs.target</filename></term>
323 <para>systemd automatically
324 adds dependencies of type
325 After to all mount units that
326 refer to local mount points
327 for this target unit. In
328 addition, systemd adds
329 dependencies of type Wants to
330 this target unit for those
332 <filename>/etc/fstab</filename>
334 <option>auto</option> and
335 <option>comment=systemd.mount</option>
336 mount options set.</para>
340 <term><filename>local-fs-pre.target</filename></term>
342 <para>This target unit is
343 automatically ordered before
344 all local mount points marked
345 with <option>auto</option>
346 (see above). It can be used to
347 execute certain units before
348 all local mounts.</para>
352 <term><filename>multi-user.target</filename></term>
354 <para>A special target unit
355 for setting up a multi-user
356 system (non-graphical). This
358 <filename>graphical.target</filename>.</para>
360 <para>Units that are needed
361 for a multi-user system shall
362 add Wants dependencies to
363 this unit for their unit during
368 <term><filename>network.target</filename></term>
370 <para>systemd automatically
371 adds dependencies of type
372 After for this target unit to
373 all SysV init script service
374 units with an LSB header
376 <literal>$network</literal>
379 <para>This unit is supposed to
380 indicate when the network is
381 "up", but it is only very
382 loosely defined what that is
383 supposed to mean. Also see <ulink
384 url="http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget">Running
385 Services After the Network is
391 <term><filename>nss-lookup.target</filename></term>
393 <para>A target that should be
394 used as synchronization point
395 for all host/network name
396 service lookups. Note that
397 this is independent of
398 user/group name lookups for
400 <filename>nss-user-lookup.target</filename>
401 should be used. systemd
403 dependencies of type After for
404 this target unit to all SysV
405 init script service units with
406 an LSB header referring to the
407 <literal>$named</literal>
412 <term><filename>nss-user-lookup.target</filename></term>
414 <para>A target that should be
415 used as synchronization point
416 for all user/group name
417 service lookups. Note that
418 this is independent of
419 host/network name lookups for
421 <filename>nss-lookup.target</filename>
422 should be used. </para>
426 <term><filename>poweroff.target</filename></term>
428 <para>A special target unit
429 for shutting down and powering off the system.</para>
431 <para>Applications wanting to
432 power off the system should start
435 <para><filename>runlevel0.target</filename>
436 is an alias for this target
437 unit, for compatibility with SysV.</para>
441 <term><filename>printer.target</filename></term>
443 <para>This target is started
444 automatically as soon as a
445 printer is plugged in or
451 <term><filename>reboot.target</filename></term>
453 <para>A special target unit
454 for shutting down and rebooting the system.</para>
456 <para>Applications wanting to
457 reboot the system should start
460 <para><filename>runlevel6.target</filename>
461 is an alias for this target
462 unit, for compatibility with SysV.</para>
466 <term><filename>remote-fs.target</filename></term>
469 <filename>local-fs.target</filename>,
473 <para>systemd automatically
474 adds dependencies of type
475 After for this target unit to
476 all SysV init script service
477 units with an LSB header
479 <literal>$remote_fs</literal>
484 <term><filename>remote-fs-pre.target</filename></term>
486 <para>This target unit is
487 automatically ordered before
488 all remote mount points marked
489 with <option>auto</option>
490 (see above). It can be used to
491 execute certain units before
492 all remote mounts.</para>
496 <term><filename>rescue.target</filename></term>
498 <para>A special target unit
499 for setting up the base system
500 and a rescue shell.</para>
502 <para><filename>runlevel1.target</filename>
503 is an alias for this target
504 unit, for compatibility with SysV.</para>
508 <term><filename>rpcbind.target</filename></term>
510 <para>systemd automatically
511 adds dependencies of type
512 After for this target unit to
513 all SysV init script service
514 units with an LSB header
516 <literal>$portmap</literal>
521 <term><filename>runlevel2.target</filename></term>
522 <term><filename>runlevel3.target</filename></term>
523 <term><filename>runlevel4.target</filename></term>
524 <term><filename>runlevel5.target</filename></term>
526 <para>These are targets that
527 are called whenever the SysV
528 compatibility code asks for
530 respectively. It is a good
531 idea to make this an alias for
533 <filename>multi-user.target</filename>
535 <filename>graphical.target</filename>
540 <term><filename>shutdown.target</filename></term>
542 <para>A special target unit
543 that terminates the services
544 on system shutdown.</para>
546 <para>Services that shall be
547 terminated on system shutdown
549 dependencies to this unit for
550 their service unit, which is
552 <varname>DefaultDependencies=yes</varname>
553 is set (the default).</para>
555 <para>systemd automatically
556 adds dependencies of type
557 Conflicts to this target unit
558 for all SysV init script
559 service units that shall be
560 terminated in SysV runlevels 0
565 <term><filename>sigpwr.target</filename></term>
567 <para>A special target that is
568 started when systemd receives
569 the SIGPWR process signal,
570 which is normally sent by the
571 kernel or UPS daemons when
576 <term><filename>sleep.target</filename></term>
578 <para>A special target unit
580 <filename>suspend.target</filename>,
581 <filename>hibernate.target</filename> and <filename>hybrid-sleep.target</filename>
582 and may be used to hook units
588 <term><filename>smartcard.target</filename></term>
590 <para>This target is started
591 automatically as soon as a
592 smartcard controller is
593 plugged in or becomes
594 available at boot.</para>
598 <term><filename>sockets.target</filename></term>
600 <para>A special target unit
601 that sets up all service
604 <para>Services that can be
605 socket-activated shall add
606 Wants dependencies to this
607 unit for their socket unit
608 during installation.</para>
612 <term><filename>sound.target</filename></term>
614 <para>This target is started
615 automatically as soon as a
616 sound card is plugged in or
622 <term><filename>suspend.target</filename></term>
624 <para>A special target unit
626 system. This pulls in
627 <filename>sleep.target</filename>.</para>
631 <term><filename>swap.target</filename></term>
634 <filename>local-fs.target</filename>, but for swap
640 <term><filename>sysinit.target</filename></term>
642 <para>A special target unit
643 covering early boot-up scripts.</para>
644 <para>systemd automatically
645 adds dependencies of the types
646 Wants and After for all
647 SysV service units configured
648 for runlevels that are not 0
649 to 6 to this target unit.
650 This covers the special
651 boot-up runlevels some
652 distributions have, such as S
657 <term><filename>syslog.socket</filename></term>
659 <para>The socket unit
660 syslog implementations should
661 listen on. All userspace log
662 messages will be made
663 available on this socket. For
664 more information about syslog
665 integration, please consult
667 url="http://www.freedesktop.org/wiki/Software/systemd/syslog">Syslog
673 <term><filename>system-update.target</filename></term>
675 <para>A special target unit
676 that is used for off-line
678 <citerefentry><refentrytitle>systemd-system-update-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
679 will redirect the boot process
681 <filename>/system-update</filename>
682 exists. For more information
684 url="http://freedesktop.org/wiki/Software/systemd/SystemUpdates">System
686 Specification</ulink>.</para>
690 <term><filename>time-sync.target</filename></term>
692 <para>systemd automatically
693 adds dependencies of type
694 After for this target unit to
695 all SysV init script service
696 units with an LSB header
698 <literal>$time</literal>
703 <term><filename>umount.target</filename></term>
705 <para>A special target unit
706 that umounts all mount and
707 automount points on system
710 <para>Mounts that shall be
711 unmounted on system shutdown
713 dependencies to this unit for
714 their mount unit, which is
716 <varname>DefaultDependencies=yes</varname>
717 is set (the default).</para>
725 <title>Special User Units</title>
727 <para>When systemd runs as a user instance, the
728 following special units are available, which have
729 similar definitions as their system counterparts:
730 <filename>default.target</filename>,
731 <filename>shutdown.target</filename>,
732 <filename>sockets.target</filename></para>
734 <para>In addition the following special unit is
735 understood only when systemd runs as service instance:</para>
739 <term><filename>exit.target</filename></term>
741 <para>A special service unit
742 for shutting down the
743 user service manager.</para>
745 <para>Applications wanting to
746 terminate the user service
747 manager should start this
748 unit. If systemd receives
749 SIGTERM or SIGINT when running
750 as user service daemon it will
751 start this unit.</para>
753 <para>Normally, this pulls in
754 <filename>shutdown.target</filename>
755 which in turn should be
756 conflicted by all units that
757 want to be shut down on
758 user service manager exit.</para>
765 <title>See Also</title>
767 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
768 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
769 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
770 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
771 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
772 <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>