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>paths.target</filename>,
77 <filename>poweroff.target</filename>,
78 <filename>printer.target</filename>,
79 <filename>reboot.target</filename>,
80 <filename>remote-fs.target</filename>,
81 <filename>remote-fs-pre.target</filename>,
82 <filename>remote-fs-setup.target</filename>,
83 <filename>rescue.target</filename>,
84 <filename>initrd-root-fs.target</filename>,
85 <filename>rpcbind.target</filename>,
86 <filename>runlevel2.target</filename>,
87 <filename>runlevel3.target</filename>,
88 <filename>runlevel4.target</filename>,
89 <filename>runlevel5.target</filename>,
90 <filename>shutdown.target</filename>,
91 <filename>sigpwr.target</filename>,
92 <filename>sleep.target</filename>,
93 <filename>smartcard.target</filename>,
94 <filename>sockets.target</filename>,
95 <filename>sound.target</filename>,
96 <filename>suspend.target</filename>,
97 <filename>swap.target</filename>,
98 <filename>sysinit.target</filename>,
99 <filename>syslog.socket</filename>,
100 <filename>system-update.target</filename>,
101 <filename>time-sync.target</filename>,
102 <filename>timers.target</filename>,
103 <filename>umount.target</filename></para>
107 <title>Description</title>
109 <para>A few units are treated specially by
110 systemd. They have special internal semantics and
111 cannot be renamed.</para>
115 <title>Special System Units</title>
119 <term><filename>basic.target</filename></term>
121 <para>A special target unit
122 covering basic boot-up.</para>
123 <para>systemd automatically
124 adds dependencies of the types
125 <varname>Requires=</varname>
126 and <varname>After=</varname>
127 for this target unit to all
128 services (except for those
130 <varname>DefaultDependencies=no</varname>).</para>
132 <para>Usually this should
133 pull-in all mount points, swap
134 devices, sockets, timers, and
135 path units and other basic
136 initialization necessary for
142 <term><filename>bluetooth.target</filename></term>
144 <para>This target is started
145 automatically as soon as a
146 Bluetooth controller is
147 plugged in or becomes
148 available at boot.</para>
150 <para>This may be used to pull
151 in Bluetooth management
152 daemons dynamically when
153 Bluetooth hardware is
158 <term><filename>ctrl-alt-del.target</filename></term>
160 <para>systemd starts this
162 Control+Alt+Del is pressed on
163 the console. Usually this
164 should be aliased (symlinked)
166 <filename>reboot.target</filename>.</para>
170 <term><filename>cryptsetup.target</filename></term>
172 <para>A target that pulls in
173 setup services for all
179 <term><filename>dbus.service</filename></term>
181 <para>A special unit for the
182 D-Bus bus daemon. As soon as
183 this service is fully started
184 up systemd will connect to it
190 <term><filename>dbus.socket</filename></term>
192 <para>A special unit for the
193 D-Bus system bus socket. All
195 <varname>Type=dbus</varname>
202 <term><filename>default.target</filename></term>
204 <para>The default unit systemd
205 starts at bootup. Usually this
206 should be aliased (symlinked)
208 <filename>multi-user.target</filename>
210 <filename>graphical.target</filename>.</para>
212 <para>The default unit systemd
213 starts at bootup can be
215 <varname>systemd.unit=</varname>
216 kernel command line option.</para>
220 <term><filename>display-manager.service</filename></term>
222 <para>The display manager
223 service. Usually this should
224 be aliased (symlinked) to
225 <filename>gdm.service</filename>
226 or a similar display manager
231 <term><filename>emergency.target</filename></term>
233 <para>A special target unit
234 that starts an emergency
236 console. This unit is supposed
237 to be used with the kernel
239 <varname>systemd.unit=</varname>
240 and has otherwise little use.
245 <term><filename>final.target</filename></term>
247 <para>A special target unit
248 that is used during the
249 shutdown logic and may be used
250 to pull in late services after
251 all normal services are
252 already terminated and all
258 <term><filename>getty.target</filename></term>
260 <para>A special target unit
261 that pulls in statically
263 <filename>getty</filename>
269 <term><filename>graphical.target</filename></term>
271 <para>A special target unit
272 for setting up a graphical
273 login screen. This pulls in
274 <filename>multi-user.target</filename>.</para>
276 <para>Units that are needed
277 for graphical logins shall add
278 <varname>Wants=</varname>
279 dependencies for their unit to
281 <filename>multi-user.target</filename>)
282 during installation. This is
284 <varname>WantedBy=graphical.target</varname>
286 <literal>[Install]</literal>
291 <term><filename>hibernate.target</filename></term>
293 <para>A special target unit
295 system. This pulls in
296 <filename>sleep.target</filename>.</para>
300 <term><filename>hybrid-sleep.target</filename></term>
302 <para>A special target unit
303 for hibernating and suspending the
304 system at the same time. This pulls in
305 <filename>sleep.target</filename>.</para>
309 <term><filename>halt.target</filename></term>
311 <para>A special target unit
312 for shutting down and halting
313 the system. Note that this
314 target is distinct from
315 <filename>poweroff.target</filename>
316 in that it generally really
317 just halts the system rather
318 than powering it down.</para>
320 <para>Applications wanting to
321 halt the system should start
326 <term><filename>initrd-fs.target</filename></term>
328 <para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
331 <varname>Before=</varname> to
332 <filename>sysroot-usr.mount</filename>
333 and all mount points fround in
334 <filename>/etc/fstab</filename>
336 <option>auto</option> and
337 <option>x-initrd.mount</option>
343 <term><filename>kbrequest.target</filename></term>
345 <para>systemd starts this
346 target whenever Alt+ArrowUp is
347 pressed on the console. This
348 is a good candidate to be
349 aliased (symlinked) to
350 <filename>rescue.target</filename>.</para>
354 <term><filename>kexec.target</filename></term>
356 <para>A special target unit
357 for shutting down and rebooting the system via kexec.</para>
359 <para>Applications wanting to
360 reboot the system with kexec should start
365 <term><filename>local-fs.target</filename></term>
367 <para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
370 <varname>Before=</varname> to
371 all mount units that refer to
372 local mount points for this
373 target unit. In addition, it
374 adds dependencies of type
375 <varname>Wants=</varname> to
376 this target unit for those
378 <filename>/etc/fstab</filename>
380 <option>auto</option> mount
385 <term><filename>local-fs-pre.target</filename></term>
387 <para>This target unit is
388 automatically ordered before
389 all local mount points marked
390 with <option>auto</option>
391 (see above). It can be used to
392 execute certain units before
393 all local mounts.</para>
397 <term><filename>multi-user.target</filename></term>
399 <para>A special target unit
400 for setting up a multi-user
401 system (non-graphical). This
403 <filename>graphical.target</filename>.</para>
405 <para>Units that are needed
406 for a multi-user system shall
407 add <varname>Wants=</varname>
408 dependencies for their unit to
410 installation. This is best
412 <varname>WantedBy=multi-uer.target</varname>
414 <literal>[Install]</literal>
419 <term><filename>network.target</filename></term>
421 <para>systemd automatically
422 adds dependencies of type
423 <varname>After=</varname> for
424 this target unit to all SysV
425 init script service units with
426 an LSB header referring to the
427 <literal>$network</literal>
430 <para>This unit is supposed to
431 indicate when the network is
432 "up", but it is only very
433 loosely defined what that is
434 supposed to mean. Also see <ulink
435 url="http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget">Running
436 Services After the Network is
442 <term><filename>nss-lookup.target</filename></term>
444 <para>A target that should be
445 used as synchronization point
446 for all host/network name
447 service lookups. Note that
448 this is independent of
449 user/group name lookups for
451 <filename>nss-user-lookup.target</filename>
452 should be used. systemd
455 <varname>After=</varname> for
456 this target unit to all SysV
457 init script service units with
458 an LSB header referring to the
459 <literal>$named</literal>
464 <term><filename>nss-user-lookup.target</filename></term>
466 <para>A target that should be
467 used as synchronization point
468 for all user/group name
469 service lookups. Note that
470 this is independent of
471 host/network name lookups for
473 <filename>nss-lookup.target</filename>
474 should be used. </para>
478 <term><filename>paths.target</filename></term>
480 <para>A special target unit
481 that sets up all path units
483 <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>
484 for details) that shall be
485 active after boot.</para>
487 <para>It is recommended that
488 path units installed by
489 applications get pulled in via
490 <varname>Wants=</varname>
491 dependencies from this
492 unit. This is best configured
494 <varname>WantedBy=paths.target</varname>
496 <literal>[Install]</literal>
501 <term><filename>poweroff.target</filename></term>
503 <para>A special target unit
504 for shutting down and powering off the system.</para>
506 <para>Applications wanting to
507 power off the system should start
510 <para><filename>runlevel0.target</filename>
511 is an alias for this target
512 unit, for compatibility with SysV.</para>
516 <term><filename>printer.target</filename></term>
518 <para>This target is started
519 automatically as soon as a
520 printer is plugged in or
524 <para>This may be used to pull
525 in printer management
526 daemons dynamically when
532 <term><filename>reboot.target</filename></term>
534 <para>A special target unit
535 for shutting down and rebooting the system.</para>
537 <para>Applications wanting to
538 reboot the system should start
541 <para><filename>runlevel6.target</filename>
542 is an alias for this target
543 unit, for compatibility with SysV.</para>
547 <term><filename>remote-fs.target</filename></term>
550 <filename>local-fs.target</filename>,
554 <para>systemd automatically
555 adds dependencies of type
556 <varname>After=</varname> for
557 this target unit to all SysV
558 init script service units with
559 an LSB header referring to the
560 <literal>$remote_fs</literal>
565 <term><filename>remote-fs-pre.target</filename></term>
567 <para>This target unit is
568 automatically ordered before
569 all remote mount point units
570 (see above). It can be used to
571 run certain units before the
573 established. Note that this
574 unit is generally not part of
575 the initial transaction,
576 unless the unit that wants to
577 be ordered before all remote
578 mounts pulls it in via a
579 <varname>Wants=</varname> type
580 dependency. If the unit wants
581 to be pulled in by the first
582 remote mount showing up it
584 <filename>remote-fs-setup.target</filename>
587 <para>Again, this target unit
588 is <emphasis>not</emphasis>
589 suitable for pulling in other
590 units, it is only useful for
595 <term><filename>remote-fs-setup.target</filename></term>
597 <para>This target unit is
598 automatically pulled in (by a
599 <varname>Wants=</varname> type
600 dependency) by all remote
601 mount points. It can be used
602 to run certain units when at
603 least one remote file system
604 is to be mounted. Note that
605 this target is not ordered
606 against the remote mounts, use
607 <filename>remote-fs-pre.target</filename>
610 <para>Again, this target unit
611 is <emphasis>not</emphasis>
612 suitable for ordering, it is
613 only useful for pulling in
618 <term><filename>rescue.target</filename></term>
620 <para>A special target unit
621 for setting up the base system
622 and a rescue shell.</para>
624 <para><filename>runlevel1.target</filename>
625 is an alias for this target
626 unit, for compatibility with SysV.</para>
630 <term><filename>initrd-root-fs.target</filename></term>
632 <para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
635 <varname>Before=</varname> to
637 <filename>sysroot.mount</filename>
638 unit, which is generated from
639 the kernel command line.
644 <term><filename>rpcbind.target</filename></term>
646 <para>systemd automatically
647 adds dependencies of type
648 <varname>After=</varname> for
649 this target unit to all SysV
650 init script service units with
651 an LSB header referring to the
652 <literal>$portmap</literal>
657 <term><filename>runlevel2.target</filename></term>
658 <term><filename>runlevel3.target</filename></term>
659 <term><filename>runlevel4.target</filename></term>
660 <term><filename>runlevel5.target</filename></term>
662 <para>These are targets that
663 are called whenever the SysV
664 compatibility code asks for
666 respectively. It is a good
667 idea to make this an alias for
669 <filename>multi-user.target</filename>
671 <filename>graphical.target</filename>
676 <term><filename>shutdown.target</filename></term>
678 <para>A special target unit
679 that terminates the services
680 on system shutdown.</para>
682 <para>Services that shall be
683 terminated on system shutdown
684 shall add <varname>Conflicts=</varname>
685 dependencies to this unit for
686 their service unit, which is
688 <varname>DefaultDependencies=yes</varname>
689 is set (the default).</para>
693 <term><filename>sigpwr.target</filename></term>
695 <para>A special target that is
696 started when systemd receives
697 the SIGPWR process signal,
698 which is normally sent by the
699 kernel or UPS daemons when
704 <term><filename>sleep.target</filename></term>
706 <para>A special target unit
708 <filename>suspend.target</filename>,
709 <filename>hibernate.target</filename>
711 <filename>hybrid-sleep.target</filename>
712 and may be used to hook units
718 <term><filename>smartcard.target</filename></term>
720 <para>This target is started
721 automatically as soon as a
722 smartcard controller is
723 plugged in or becomes
724 available at boot.</para>
726 <para>This may be used to pull
727 in printer management
728 daemons dynamically when
729 smartcard hardware is
734 <term><filename>sockets.target</filename></term>
736 <para>A special target unit
737 that sets up all socket
739 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>
740 for details) that shall be
741 active after boot.</para>
743 <para>Services that can be
744 socket-activated shall add
745 <varname>Wants=</varname>
746 dependencies to this unit for
747 their socket unit during
748 installation. This is best
750 <varname>WantedBy=sockets.target</varname>
752 <literal>[Install]</literal>
757 <term><filename>sound.target</filename></term>
759 <para>This target is started
760 automatically as soon as a
761 sound card is plugged in or
765 <para>This may be used to pull
766 in audio management daemons
767 dynamically when printer
768 hardware is found.</para>
772 <term><filename>suspend.target</filename></term>
774 <para>A special target unit
776 system. This pulls in
777 <filename>sleep.target</filename>.</para>
781 <term><filename>swap.target</filename></term>
784 <filename>local-fs.target</filename>, but for swap
790 <term><filename>sysinit.target</filename></term>
792 <para>A special target unit
793 covering early boot-up scripts.</para>
797 <term><filename>syslog.socket</filename></term>
799 <para>The socket unit
800 syslog implementations should
801 listen on. All userspace log
802 messages will be made
803 available on this socket. For
804 more information about syslog
805 integration, please consult
807 url="http://www.freedesktop.org/wiki/Software/systemd/syslog">Syslog
813 <term><filename>system-update.target</filename></term>
815 <para>A special target unit
816 that is used for off-line
818 <citerefentry><refentrytitle>systemd-system-update-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
819 will redirect the boot process
821 <filename>/system-update</filename>
822 exists. For more information
824 url="http://freedesktop.org/wiki/Software/systemd/SystemUpdates">System
826 Specification</ulink>.</para>
830 <term><filename>time-sync.target</filename></term>
832 <para>systemd automatically
833 adds dependencies of type
834 <varname>After=</varname> for
835 this target unit to all SysV
836 init script service units with
837 an LSB header referring to the
838 <literal>$time</literal>
843 <term><filename>timers.target</filename></term>
845 <para>A special target unit
846 that sets up all timer
848 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>
849 for details) that shall be
850 active after boot.</para>
852 <para>It is recommended that
853 timer units installed by
854 applications get pulled in via
855 <varname>Wants=</varname>
856 dependencies from this
857 unit. This is best configured
859 <varname>WantedBy=timers.target</varname>
861 <literal>[Install]</literal>
866 <term><filename>umount.target</filename></term>
868 <para>A special target unit
869 that umounts all mount and
870 automount points on system
873 <para>Mounts that shall be
874 unmounted on system shutdown
876 dependencies to this unit for
877 their mount unit, which is
879 <varname>DefaultDependencies=yes</varname>
880 is set (the default).</para>
888 <title>Special User Units</title>
890 <para>When systemd runs as a user instance, the
891 following special units are available, which have
892 similar definitions as their system counterparts:
893 <filename>default.target</filename>,
894 <filename>shutdown.target</filename>,
895 <filename>sockets.target</filename></para>
897 <para>In addition the following special unit is
898 understood only when systemd runs as service instance:</para>
902 <term><filename>exit.target</filename></term>
904 <para>A special service unit
905 for shutting down the
906 user service manager.</para>
908 <para>Applications wanting to
909 terminate the user service
910 manager should start this
911 unit. If systemd receives
912 SIGTERM or SIGINT when running
913 as user service daemon it will
914 start this unit.</para>
916 <para>Normally, this pulls in
917 <filename>shutdown.target</filename>
918 which in turn should be
919 conflicted by all units that
920 want to be shut down on
921 user service manager exit.</para>
928 <title>See Also</title>
930 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
931 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
932 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
933 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
934 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
935 <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
936 <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>