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>hibernate.target</filename>,
65 <filename>http-daemon.target</filename>,
66 <filename>hybrid-sleep.target</filename>,
67 <filename>halt.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>mail-transfer-agent.target</filename>,
73 <filename>multi-user.target</filename>,
74 <filename>network.target</filename>,
75 <filename>nss-lookup.target</filename>,
76 <filename>nss-user-lookup.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>rpcbind.target</filename>,
84 <filename>runlevel2.target</filename>,
85 <filename>runlevel3.target</filename>,
86 <filename>runlevel4.target</filename>,
87 <filename>runlevel5.target</filename>,
88 <filename>shutdown.target</filename>,
89 <filename>sigpwr.target</filename>,
90 <filename>sleep.target</filename>,
91 <filename>smartcard.target</filename>,
92 <filename>sockets.target</filename>,
93 <filename>sound.target</filename>,
94 <filename>suspend.target</filename>,
95 <filename>swap.target</filename>,
96 <filename>sysinit.target</filename>,
97 <filename>syslog.socket</filename>,
98 <filename>syslog.target</filename>,
99 <filename>system-update.target</filename>,
100 <filename>time-sync.target</filename>,
101 <filename>umount.target</filename></para>
105 <title>Description</title>
107 <para>A few units are treated specially by
108 systemd. They have special internal semantics and
109 cannot be renamed.</para>
113 <title>Special System Units</title>
117 <term><filename>basic.target</filename></term>
119 <para>A special target unit
120 covering early boot-up.</para>
121 <para>systemd automatically
122 adds dependencies of the types
123 Requires and After for this
124 target unit to all SysV
125 service units configured for
126 runlevel 1 to 5.</para>
127 <para>Usually this should pull-in
128 all sockets, mount points,
129 swap devices and other basic
130 initialization necessary for
132 daemons. Most normal daemons
133 should have dependencies of
134 type After and Requires on
139 <term><filename>bluetooth.target</filename></term>
141 <para>This target is started
142 automatically as soon as a
143 bluetooth controller is
144 plugged in or becomes
145 available at boot.</para>
149 <term><filename>ctrl-alt-del.target</filename></term>
151 <para>systemd starts this
153 Control+Alt+Del is pressed on
154 the console. Usually this
155 should be aliased (symlinked)
157 <filename>reboot.target</filename>.</para>
161 <term><filename>cryptsetup.target</filename></term>
163 <para>A target that pulls in
164 setup services for all
170 <term><filename>dbus.service</filename></term>
172 <para>A special unit for the
173 D-Bus system bus. As soon as
174 this service is fully started
175 up systemd will connect to it
181 <term><filename>dbus.socket</filename></term>
183 <para>A special unit for the
184 D-Bus system bus socket. All
186 <literal>Type=dbus</literal>
193 <term><filename>default.target</filename></term>
195 <para>The default unit systemd
196 starts at bootup. Usually this
197 should be aliased (symlinked)
199 <filename>multi-user.target</filename>
201 <filename>graphical.target</filename>.</para>
202 <para>The default unit systemd
203 starts at bootup can be
205 <varname>systemd.unit=</varname>
206 kernel command line option.</para>
210 <term><filename>display-manager.service</filename></term>
212 <para>The display manager
213 service. Usually this should
214 be aliased (symlinked) to
215 <filename>gdm.service</filename>
216 or a similar display manager
218 <para>systemd automatically
219 adds dependencies of type
220 After for this target unit to
221 all SysV init script service
222 units with a LSB header
224 <literal>$x-display-manager</literal>
225 facility, for compatibility
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 all local TTY
261 <filename>getty</filename> instances.
266 <term><filename>graphical.target</filename></term>
268 <para>A special target unit
269 for setting up a graphical
270 login screen. This pulls in
271 <filename>multi-user.target</filename>.</para>
273 <para>Units that are needed
274 for graphical login shall add
275 Wants dependencies for their
276 unit to this unit (or
277 <filename>multi-user.target</filename>)
278 during installation.</para>
282 <term><filename>hibernate.target</filename></term>
284 <para>A special target unit
286 system. This pulls in
287 <filename>sleep.target</filename>.</para>
291 <term><filename>http-daemon.target</filename></term>
293 <para>A target for pulling in
294 an HTTP server if there is
296 <para>systemd automatically
297 adds dependencies of type
298 After for this target unit to
299 all SysV init script service
300 units with a LSB header
302 <literal>$httpd</literal>
307 <term><filename>hybrid-sleep.target</filename></term>
309 <para>A special target unit
310 for hibernating and suspending the
311 system at the same time. This pulls in
312 <filename>sleep.target</filename>.</para>
316 <term><filename>halt.target</filename></term>
318 <para>A special target unit
319 for shutting down and halting the system.</para>
321 <para>Applications wanting to
322 halt the system should start
327 <term><filename>kbrequest.target</filename></term>
329 <para>systemd starts this
330 target whenever Alt+ArrowUp is
331 pressed on the console. This
332 is a good candidate to be
333 aliased (symlinked) to
334 <filename>rescue.target</filename>.</para>
338 <term><filename>kexec.target</filename></term>
340 <para>A special target unit
341 for shutting down and rebooting the system via kexec.</para>
343 <para>Applications wanting to
344 reboot the system with kexec should start
349 <term><filename>local-fs.target</filename></term>
351 <para>systemd automatically
352 adds dependencies of type
353 After to all mount units that
354 refer to local mount points
355 for this target unit. In
356 addition, systemd adds
357 dependencies of type Wants to
358 this target unit for those
360 <filename>/etc/fstab</filename>
362 <option>auto</option> and
363 <option>comment=systemd.mount</option>
364 mount options set.</para>
366 <para>systemd automatically
367 adds dependencies of type
368 After for this target unit to
369 all SysV init script service
370 units with an LSB header
372 <literal>$local_fs</literal>
377 <term><filename>local-fs-pre.target</filename></term>
379 <para>This target unit is
380 automatically ordered before
381 all local mount points marked
382 with <option>auto</option>
383 (see above). It can be used to
384 execute certain units before
385 all local mounts.</para>
389 <term><filename>mail-transfer-agent.target</filename></term>
391 <para>The mail transfer agent
392 (MTA) service. Usually this
393 should pull-in all units
395 sending/receiving mails on the
398 <para>systemd automatically
399 adds dependencies of type
400 After for this target unit to
401 all SysV init script service
402 units with an LSB header
404 <literal>$mail-transfer-agent</literal>
406 <literal>$mail-transport-agent</literal>
407 facilities, for compatibility
412 <term><filename>multi-user.target</filename></term>
414 <para>A special target unit
415 for setting up a multi-user
416 system (non-graphical). This
418 <filename>graphical.target</filename>.</para>
420 <para>Units that are needed
421 for a multi-user system shall
422 add Wants dependencies to
423 this unit for their unit during
428 <term><filename>network.target</filename></term>
430 <para>systemd automatically
431 adds dependencies of type
432 After for this target unit to
433 all SysV init script service
434 units with an LSB header
436 <literal>$network</literal>
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
453 dependencies of type After for
454 this target unit to all SysV
455 init script service units with
456 an LSB header referring to the
457 <literal>$named</literal>
462 <term><filename>nss-user-lookup.target</filename></term>
464 <para>A target that should be
465 used as synchronization point
466 for all user/group name
467 service lookups. Note that
468 this is independent of
469 host/network name lookups for
471 <filename>nss-lookup.target</filename>
472 should be used. </para>
476 <term><filename>poweroff.target</filename></term>
478 <para>A special target unit
479 for shutting down and powering off the system.</para>
481 <para>Applications wanting to
482 power off the system should start
485 <para><filename>runlevel0.target</filename>
486 is an alias for this target
487 unit, for compatibility with SysV.</para>
491 <term><filename>printer.target</filename></term>
493 <para>This target is started
494 automatically as soon as a
495 printer is plugged in or
501 <term><filename>reboot.target</filename></term>
503 <para>A special target unit
504 for shutting down and rebooting the system.</para>
506 <para>Applications wanting to
507 reboot the system should start
510 <para><filename>runlevel6.target</filename>
511 is an alias for this target
512 unit, for compatibility with SysV.</para>
516 <term><filename>remote-fs.target</filename></term>
519 <filename>local-fs.target</filename>,
523 <para>systemd automatically
524 adds dependencies of type
525 After for this target unit to
526 all SysV init script service
527 units with an LSB header
529 <literal>$remote_fs</literal>
534 <term><filename>remote-fs-pre.target</filename></term>
536 <para>This target unit is
537 automatically ordered before
538 all remote mount points marked
539 with <option>auto</option>
540 (see above). It can be used to
541 execute certain units before
542 all remote mounts.</para>
546 <term><filename>rescue.target</filename></term>
548 <para>A special target unit
549 for setting up the base system
550 and a rescue shell.</para>
552 <para><filename>runlevel1.target</filename>
553 is an alias for this target
554 unit, for compatibility with SysV.</para>
558 <term><filename>rpcbind.target</filename></term>
560 <para>systemd automatically
561 adds dependencies of type
562 After for this target unit to
563 all SysV init script service
564 units with an LSB header
566 <literal>$portmap</literal>
571 <term><filename>runlevel2.target</filename></term>
573 <para>This is a target that is
574 called whenever the SysV
575 compatibility code asks for
576 runlevel 2. It is a good idea
577 to make this an alias for
579 <filename>multi-user.target</filename>.</para>
583 <term><filename>runlevel3.target</filename></term>
585 <para>This is a target that is
586 called whenever the SysV
587 compatibility code asks for
588 runlevel 3. It is a good idea
589 to make this an alias for
591 <filename>multi-user.target</filename>
593 <filename>graphical.target</filename>.</para>
597 <term><filename>runlevel4.target</filename></term>
599 <para>This is a target that is
600 called whenever the SysV
601 compatibility code asks for
602 runlevel 4. It is a good idea
603 to make this an alias for
605 <filename>multi-user.target</filename>
607 <filename>graphical.target</filename>.</para>
611 <term><filename>runlevel5.target</filename></term>
613 <para>This is a target that is
614 called whenever the SysV
615 compatibility code asks for
616 runlevel 5. It is a good idea
617 to make this an alias for
619 <filename>multi-user.target</filename>
621 <filename>graphical.target</filename>.</para>
625 <term><filename>shutdown.target</filename></term>
627 <para>A special target unit
628 that terminates the services
629 on system shutdown.</para>
631 <para>Services that shall be
632 terminated on system shutdown
634 dependencies to this unit for
635 their service unit, which is
637 <varname>DefaultDependencies=yes</varname>
638 is set (the default).</para>
640 <para>systemd automatically
641 adds dependencies of type
642 Conflicts to this target unit
643 for all SysV init script
644 service units that shall be
645 terminated in SysV runlevels 0
650 <term><filename>sigpwr.target</filename></term>
652 <para>A special target that is
653 started when systemd receives
654 the SIGPWR process signal,
655 which is normally sent by the
656 kernel or UPS daemons when
661 <term><filename>sleep.target</filename></term>
663 <para>A special target unit
665 <filename>suspend.target</filename>,
666 <filename>hibernate.target</filename> and <filename>hybrid-sleep.target</filename>
667 and may be used to hook units
673 <term><filename>smartcard.target</filename></term>
675 <para>This target is started
676 automatically as soon as a
677 smartcard controller is
678 plugged in or becomes
679 available at boot.</para>
683 <term><filename>sockets.target</filename></term>
685 <para>A special target unit
686 that sets up all service
689 <para>Services that can be
690 socket-activated shall add
691 Wants dependencies to this
692 unit for their socket unit
693 during installation.</para>
697 <term><filename>sound.target</filename></term>
699 <para>This target is started
700 automatically as soon as a
701 sound card is plugged in or
707 <term><filename>suspend.target</filename></term>
709 <para>A special target unit
711 system. This pulls in
712 <filename>sleep.target</filename>.</para>
716 <term><filename>swap.target</filename></term>
719 <filename>local-fs.target</filename>, but for swap
725 <term><filename>sysinit.target</filename></term>
727 <para>A special target unit
728 covering early boot-up scripts.</para>
729 <para>systemd automatically
730 adds dependencies of the types
731 Wants and After for all
732 SysV service units configured
733 for runlevels that are not 0
734 to 6 to this target unit.
735 This covers the special
736 boot-up runlevels some
737 distributions have, such as S
742 <term><filename>syslog.socket</filename></term>
744 <para>The socket unit where
745 syslog implementations should
746 listen on. All userspace log
747 messages will be made
748 available on this socket. For
749 more information about syslog
750 integration, please consult
752 url="http://www.freedesktop.org/wiki/Software/systemd/syslog">Syslog
758 <term><filename>syslog.target</filename></term>
760 <para>systemd automatically
761 adds dependencies of type
762 After for this target unit to
763 all SysV init script service
764 units with an LSB header
766 <literal>$syslog</literal>
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 After for this target unit to
793 all SysV init script service
794 units with an LSB header
796 <literal>$time</literal>
801 <term><filename>umount.target</filename></term>
803 <para>A special target unit
804 that umounts all mount and
805 automount points on system
808 <para>Mounts that shall be
809 unmounted on system shutdown
811 dependencies to this unit for
812 their mount unit, which is
814 <varname>DefaultDependencies=yes</varname>
815 is set (the default).</para>
823 <title>Special User Units</title>
825 <para>When systemd runs as a user instance, the
826 following special units are available, which have
827 similar definitions as their system counterparts:
828 <filename>default.target</filename>,
829 <filename>shutdown.target</filename>,
830 <filename>sockets.target</filename></para>
832 <para>In addition the following special unit is
833 understood only when systemd runs as service instance:</para>
837 <term><filename>exit.target</filename></term>
839 <para>A special service unit
840 for shutting down the
841 user service manager.</para>
843 <para>Applications wanting to
844 terminate the user service
845 manager should start this
846 unit. If systemd receives
847 SIGTERM or SIGINT when running
848 as user service daemon it will
849 start this unit.</para>
851 <para>Normally, this pulls in
852 <filename>shutdown.target</filename>
853 which in turn should be
854 conflicted by all units that
855 want to be shut down on
856 user service manager exit.</para>
863 <title>See Also</title>
865 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
866 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
867 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
868 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
869 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
870 <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>