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>rescue.target</filename>,
83 <filename>initrd-root-fs.target</filename>,
84 <filename>rpcbind.target</filename>,
85 <filename>runlevel2.target</filename>,
86 <filename>runlevel3.target</filename>,
87 <filename>runlevel4.target</filename>,
88 <filename>runlevel5.target</filename>,
89 <filename>shutdown.target</filename>,
90 <filename>sigpwr.target</filename>,
91 <filename>sleep.target</filename>,
92 <filename>smartcard.target</filename>,
93 <filename>sockets.target</filename>,
94 <filename>sound.target</filename>,
95 <filename>suspend.target</filename>,
96 <filename>swap.target</filename>,
97 <filename>sysinit.target</filename>,
98 <filename>syslog.socket</filename>,
99 <filename>system-update.target</filename>,
100 <filename>time-sync.target</filename>,
101 <filename>timers.target</filename>,
102 <filename>umount.target</filename></para>
106 <title>Description</title>
108 <para>A few units are treated specially by
109 systemd. They have special internal semantics and
110 cannot be renamed.</para>
114 <title>Special System Units</title>
118 <term><filename>basic.target</filename></term>
120 <para>A special target unit
121 covering basic boot-up.</para>
122 <para>systemd automatically
123 adds dependencies of the types
124 <varname>Requires=</varname>
125 and <varname>After=</varname>
126 for this target unit to all
127 services (except for those
129 <varname>DefaultDependencies=no</varname>).</para>
131 <para>Usually this should
132 pull-in all mount points, swap
133 devices, sockets, timers, and
134 path units and other basic
135 initialization necessary for
141 <term><filename>bluetooth.target</filename></term>
143 <para>This target is started
144 automatically as soon as a
145 Bluetooth controller is
146 plugged in or becomes
147 available at boot.</para>
149 <para>This may be used to pull
150 in Bluetooth management
151 daemons dynamically when
152 Bluetooth hardware is
157 <term><filename>ctrl-alt-del.target</filename></term>
159 <para>systemd starts this
161 Control+Alt+Del is pressed on
162 the console. Usually this
163 should be aliased (symlinked)
165 <filename>reboot.target</filename>.</para>
169 <term><filename>cryptsetup.target</filename></term>
171 <para>A target that pulls in
172 setup services for all
178 <term><filename>dbus.service</filename></term>
180 <para>A special unit for the
181 D-Bus bus daemon. As soon as
182 this service is fully started
183 up systemd will connect to it
189 <term><filename>dbus.socket</filename></term>
191 <para>A special unit for the
192 D-Bus system bus socket. All
194 <varname>Type=dbus</varname>
201 <term><filename>default.target</filename></term>
203 <para>The default unit systemd
204 starts at bootup. Usually this
205 should be aliased (symlinked)
207 <filename>multi-user.target</filename>
209 <filename>graphical.target</filename>.</para>
211 <para>The default unit systemd
212 starts at bootup can be
214 <varname>systemd.unit=</varname>
215 kernel command line option.</para>
219 <term><filename>display-manager.service</filename></term>
221 <para>The display manager
222 service. Usually this should
223 be aliased (symlinked) to
224 <filename>gdm.service</filename>
225 or a similar display manager
230 <term><filename>emergency.target</filename></term>
232 <para>A special target unit
233 that starts an emergency
235 console. This unit is supposed
236 to be used with the kernel
238 <varname>systemd.unit=</varname>
239 and has otherwise little use.
244 <term><filename>final.target</filename></term>
246 <para>A special target unit
247 that is used during the
248 shutdown logic and may be used
249 to pull in late services after
250 all normal services are
251 already terminated and all
257 <term><filename>getty.target</filename></term>
259 <para>A special target unit
260 that pulls in statically
262 <filename>getty</filename>
268 <term><filename>graphical.target</filename></term>
270 <para>A special target unit
271 for setting up a graphical
272 login screen. This pulls in
273 <filename>multi-user.target</filename>.</para>
275 <para>Units that are needed
276 for graphical logins shall add
277 <varname>Wants=</varname>
278 dependencies for their unit to
280 <filename>multi-user.target</filename>)
281 during installation. This is
283 <varname>WantedBy=graphical.target</varname>
285 <literal>[Install]</literal>
290 <term><filename>hibernate.target</filename></term>
292 <para>A special target unit
294 system. This pulls in
295 <filename>sleep.target</filename>.</para>
299 <term><filename>hybrid-sleep.target</filename></term>
301 <para>A special target unit
302 for hibernating and suspending the
303 system at the same time. This pulls in
304 <filename>sleep.target</filename>.</para>
308 <term><filename>halt.target</filename></term>
310 <para>A special target unit
311 for shutting down and halting
312 the system. Note that this
313 target is distinct from
314 <filename>poweroff.target</filename>
315 in that it generally really
316 just halts the system rather
317 than powering it down.</para>
319 <para>Applications wanting to
320 halt the system should start
325 <term><filename>initrd-fs.target</filename></term>
327 <para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
330 <varname>Before=</varname> to
331 <filename>sysroot-usr.mount</filename>
332 and all mount points fround in
333 <filename>/etc/fstab</filename>
335 <option>auto</option> and
336 <option>x-initrd.mount</option>
342 <term><filename>kbrequest.target</filename></term>
344 <para>systemd starts this
345 target whenever Alt+ArrowUp is
346 pressed on the console. This
347 is a good candidate to be
348 aliased (symlinked) to
349 <filename>rescue.target</filename>.</para>
353 <term><filename>kexec.target</filename></term>
355 <para>A special target unit
356 for shutting down and rebooting the system via kexec.</para>
358 <para>Applications wanting to
359 reboot the system with kexec should start
364 <term><filename>local-fs.target</filename></term>
366 <para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
369 <varname>Before=</varname> to
370 all mount units that refer to
371 local mount points for this
372 target unit. In addition, it
373 adds dependencies of type
374 <varname>Wants=</varname> to
375 this target unit for those
377 <filename>/etc/fstab</filename>
379 <option>auto</option> mount
384 <term><filename>local-fs-pre.target</filename></term>
386 <para>This target unit is
387 automatically ordered before
388 all local mount points marked
389 with <option>auto</option>
390 (see above). It can be used to
391 execute certain units before
392 all local mounts.</para>
396 <term><filename>multi-user.target</filename></term>
398 <para>A special target unit
399 for setting up a multi-user
400 system (non-graphical). This
402 <filename>graphical.target</filename>.</para>
404 <para>Units that are needed
405 for a multi-user system shall
406 add <varname>Wants=</varname>
407 dependencies for their unit to
409 installation. This is best
411 <varname>WantedBy=multi-uer.target</varname>
413 <literal>[Install]</literal>
418 <term><filename>network.target</filename></term>
420 <para>systemd automatically
421 adds dependencies of type
422 <varname>After=</varname> for
423 this target unit to all SysV
424 init script service units with
425 an LSB header referring to the
426 <literal>$network</literal>
429 <para>This unit is supposed to
430 indicate when the network is
431 "up", but it is only very
432 loosely defined what that is
433 supposed to mean. Also see <ulink
434 url="http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget">Running
435 Services After the Network is
441 <term><filename>nss-lookup.target</filename></term>
443 <para>A target that should be
444 used as synchronization point
445 for all host/network name
446 service lookups. Note that
447 this is independent of
448 user/group name lookups for
450 <filename>nss-user-lookup.target</filename>
451 should be used. systemd
454 <varname>After=</varname> for
455 this target unit to all SysV
456 init script service units with
457 an LSB header referring to the
458 <literal>$named</literal>
463 <term><filename>nss-user-lookup.target</filename></term>
465 <para>A target that should be
466 used as synchronization point
467 for all user/group name
468 service lookups. Note that
469 this is independent of
470 host/network name lookups for
472 <filename>nss-lookup.target</filename>
473 should be used. </para>
477 <term><filename>paths.target</filename></term>
479 <para>A special target unit
480 that sets up all path units
482 <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>
483 for details) that shall be
484 active after boot.</para>
486 <para>It is recommended that
487 path units installed by
488 applications get pulled in via
489 <varname>Wants=</varname>
490 dependencies from this
491 unit. This is best configured
493 <varname>WantedBy=paths.target</varname>
495 <literal>[Install]</literal>
500 <term><filename>poweroff.target</filename></term>
502 <para>A special target unit
503 for shutting down and powering off the system.</para>
505 <para>Applications wanting to
506 power off the system should start
509 <para><filename>runlevel0.target</filename>
510 is an alias for this target
511 unit, for compatibility with SysV.</para>
515 <term><filename>printer.target</filename></term>
517 <para>This target is started
518 automatically as soon as a
519 printer is plugged in or
523 <para>This may be used to pull
524 in printer management
525 daemons dynamically when
531 <term><filename>reboot.target</filename></term>
533 <para>A special target unit
534 for shutting down and rebooting the system.</para>
536 <para>Applications wanting to
537 reboot the system should start
540 <para><filename>runlevel6.target</filename>
541 is an alias for this target
542 unit, for compatibility with SysV.</para>
546 <term><filename>remote-fs.target</filename></term>
549 <filename>local-fs.target</filename>,
553 <para>systemd automatically
554 adds dependencies of type
555 <varname>After=</varname> for
556 this target unit to all SysV
557 init script service units with
558 an LSB header referring to the
559 <literal>$remote_fs</literal>
564 <term><filename>remote-fs-pre.target</filename></term>
566 <para>This target unit is
567 automatically ordered before
568 all remote mount points marked
569 with <option>auto</option>
570 (see above). It can be used to
571 execute certain units before
572 all remote mounts.</para>
576 <term><filename>rescue.target</filename></term>
578 <para>A special target unit
579 for setting up the base system
580 and a rescue shell.</para>
582 <para><filename>runlevel1.target</filename>
583 is an alias for this target
584 unit, for compatibility with SysV.</para>
588 <term><filename>initrd-root-fs.target</filename></term>
590 <para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
593 <varname>Before=</varname> to
595 <filename>sysroot.mount</filename>
596 unit, which is generated from
597 the kernel command line.
602 <term><filename>rpcbind.target</filename></term>
604 <para>systemd automatically
605 adds dependencies of type
606 <varname>After=</varname> for
607 this target unit to all SysV
608 init script service units with
609 an LSB header referring to the
610 <literal>$portmap</literal>
615 <term><filename>runlevel2.target</filename></term>
616 <term><filename>runlevel3.target</filename></term>
617 <term><filename>runlevel4.target</filename></term>
618 <term><filename>runlevel5.target</filename></term>
620 <para>These are targets that
621 are called whenever the SysV
622 compatibility code asks for
624 respectively. It is a good
625 idea to make this an alias for
627 <filename>multi-user.target</filename>
629 <filename>graphical.target</filename>
634 <term><filename>shutdown.target</filename></term>
636 <para>A special target unit
637 that terminates the services
638 on system shutdown.</para>
640 <para>Services that shall be
641 terminated on system shutdown
642 shall add <varname>Conflicts=</varname>
643 dependencies to this unit for
644 their service unit, which is
646 <varname>DefaultDependencies=yes</varname>
647 is set (the default).</para>
651 <term><filename>sigpwr.target</filename></term>
653 <para>A special target that is
654 started when systemd receives
655 the SIGPWR process signal,
656 which is normally sent by the
657 kernel or UPS daemons when
662 <term><filename>sleep.target</filename></term>
664 <para>A special target unit
666 <filename>suspend.target</filename>,
667 <filename>hibernate.target</filename>
669 <filename>hybrid-sleep.target</filename>
670 and may be used to hook units
676 <term><filename>smartcard.target</filename></term>
678 <para>This target is started
679 automatically as soon as a
680 smartcard controller is
681 plugged in or becomes
682 available at boot.</para>
684 <para>This may be used to pull
685 in printer management
686 daemons dynamically when
687 smartcard hardware is
692 <term><filename>sockets.target</filename></term>
694 <para>A special target unit
695 that sets up all socket
697 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>
698 for details) that shall be
699 active after boot.</para>
701 <para>Services that can be
702 socket-activated shall add
703 <varname>Wants=</varname>
704 dependencies to this unit for
705 their socket unit during
706 installation. This is best
708 <varname>WantedBy=sockets.target</varname>
710 <literal>[Install]</literal>
715 <term><filename>sound.target</filename></term>
717 <para>This target is started
718 automatically as soon as a
719 sound card is plugged in or
723 <para>This may be used to pull
724 in audio management daemons
725 dynamically when printer
726 hardware is found.</para>
730 <term><filename>suspend.target</filename></term>
732 <para>A special target unit
734 system. This pulls in
735 <filename>sleep.target</filename>.</para>
739 <term><filename>swap.target</filename></term>
742 <filename>local-fs.target</filename>, but for swap
748 <term><filename>sysinit.target</filename></term>
750 <para>A special target unit
751 covering early boot-up scripts.</para>
755 <term><filename>syslog.socket</filename></term>
757 <para>The socket unit
758 syslog implementations should
759 listen on. All userspace log
760 messages will be made
761 available on this socket. For
762 more information about syslog
763 integration, please consult
765 url="http://www.freedesktop.org/wiki/Software/systemd/syslog">Syslog
771 <term><filename>system-update.target</filename></term>
773 <para>A special target unit
774 that is used for off-line
776 <citerefentry><refentrytitle>systemd-system-update-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
777 will redirect the boot process
779 <filename>/system-update</filename>
780 exists. For more information
782 url="http://freedesktop.org/wiki/Software/systemd/SystemUpdates">System
784 Specification</ulink>.</para>
788 <term><filename>time-sync.target</filename></term>
790 <para>systemd automatically
791 adds dependencies of type
792 <varname>After=</varname> for
793 this target unit to all SysV
794 init script service units with
795 an LSB header referring to the
796 <literal>$time</literal>
801 <term><filename>timers.target</filename></term>
803 <para>A special target unit
804 that sets up all timer
806 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>
807 for details) that shall be
808 active after boot.</para>
810 <para>It is recommended that
811 timer units installed by
812 applications get pulled in via
813 <varname>Wants=</varname>
814 dependencies from this
815 unit. This is best configured
817 <varname>WantedBy=timers.target</varname>
819 <literal>[Install]</literal>
824 <term><filename>umount.target</filename></term>
826 <para>A special target unit
827 that umounts all mount and
828 automount points on system
831 <para>Mounts that shall be
832 unmounted on system shutdown
834 dependencies to this unit for
835 their mount unit, which is
837 <varname>DefaultDependencies=yes</varname>
838 is set (the default).</para>
846 <title>Special User Units</title>
848 <para>When systemd runs as a user instance, the
849 following special units are available, which have
850 similar definitions as their system counterparts:
851 <filename>default.target</filename>,
852 <filename>shutdown.target</filename>,
853 <filename>sockets.target</filename></para>
855 <para>In addition the following special unit is
856 understood only when systemd runs as service instance:</para>
860 <term><filename>exit.target</filename></term>
862 <para>A special service unit
863 for shutting down the
864 user service manager.</para>
866 <para>Applications wanting to
867 terminate the user service
868 manager should start this
869 unit. If systemd receives
870 SIGTERM or SIGINT when running
871 as user service daemon it will
872 start this unit.</para>
874 <para>Normally, this pulls in
875 <filename>shutdown.target</filename>
876 which in turn should be
877 conflicted by all units that
878 want to be shut down on
879 user service manager exit.</para>
886 <title>See Also</title>
888 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
889 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
890 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
891 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
892 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
893 <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
894 <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>