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>halt.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>mail-transfer-agent.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>poweroff.target</filename>,
77 <filename>printer.target</filename>,
78 <filename>reboot.target</filename>,
79 <filename>remote-fs.target</filename>,
80 <filename>remote-fs-pre.target</filename>,
81 <filename>rescue.target</filename>,
82 <filename>rpcbind.target</filename>,
83 <filename>runlevel2.target</filename>,
84 <filename>runlevel3.target</filename>,
85 <filename>runlevel4.target</filename>,
86 <filename>runlevel5.target</filename>,
87 <filename>shutdown.target</filename>,
88 <filename>sigpwr.target</filename>,
89 <filename>sleep.target</filename>,
90 <filename>smartcard.target</filename>,
91 <filename>sockets.target</filename>,
92 <filename>sound.target</filename>,
93 <filename>suspend.target</filename>,
94 <filename>swap.target</filename>,
95 <filename>sysinit.target</filename>,
96 <filename>syslog.service</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>halt.target</filename></term>
309 <para>A special target unit
310 for shutting down and halting the system.</para>
312 <para>Applications wanting to
313 halt the system should start
318 <term><filename>kbrequest.target</filename></term>
320 <para>systemd starts this
321 target whenever Alt+ArrowUp is
322 pressed on the console. This
323 is a good candidate to be
324 aliased (symlinked) to
325 <filename>rescue.target</filename>.</para>
329 <term><filename>kexec.target</filename></term>
331 <para>A special target unit
332 for shutting down and rebooting the system via kexec.</para>
334 <para>Applications wanting to
335 reboot the system with kexec should start
340 <term><filename>local-fs.target</filename></term>
342 <para>systemd automatically
343 adds dependencies of type
344 After to all mount units that
345 refer to local mount points
346 for this target unit. In
347 addition, systemd adds
348 dependencies of type Wants to
349 this target unit for those
351 <filename>/etc/fstab</filename>
353 <option>auto</option> and
354 <option>comment=systemd.mount</option>
355 mount options set.</para>
357 <para>systemd automatically
358 adds dependencies of type
359 After for this target unit to
360 all SysV init script service
361 units with an LSB header
363 <literal>$local_fs</literal>
368 <term><filename>local-fs-pre.target</filename></term>
370 <para>This target unit is
371 automatically ordered before
372 all local mount points marked
373 with <option>auto</option>
374 (see above). It can be used to
375 execute certain units before
376 all local mounts.</para>
380 <term><filename>mail-transfer-agent.target</filename></term>
382 <para>The mail transfer agent
383 (MTA) service. Usually this
384 should pull-in all units
386 sending/receiving mails on the
389 <para>systemd automatically
390 adds dependencies of type
391 After for this target unit to
392 all SysV init script service
393 units with an LSB header
395 <literal>$mail-transfer-agent</literal>
397 <literal>$mail-transport-agent</literal>
398 facilities, for compatibility
403 <term><filename>multi-user.target</filename></term>
405 <para>A special target unit
406 for setting up a multi-user
407 system (non-graphical). This
409 <filename>graphical.target</filename>.</para>
411 <para>Units that are needed
412 for a multi-user system shall
413 add Wants dependencies to
414 this unit for their unit during
419 <term><filename>network.target</filename></term>
421 <para>systemd automatically
422 adds dependencies of type
423 After for this target unit to
424 all SysV init script service
425 units with an LSB header
427 <literal>$network</literal>
432 <term><filename>nss-lookup.target</filename></term>
434 <para>A target that should be
435 used as synchronization point
436 for all host/network name
437 service lookups. Note that
438 this is independent of
439 user/group name lookups for
441 <filename>nss-user-lookup.target</filename>
442 should be used. systemd
444 dependencies of type After for
445 this target unit to all SysV
446 init script service units with
447 an LSB header referring to the
448 <literal>$named</literal>
453 <term><filename>nss-user-lookup.target</filename></term>
455 <para>A target that should be
456 used as synchronization point
457 for all user/group name
458 service lookups. Note that
459 this is independent of
460 host/network name lookups for
462 <filename>nss-lookup.target</filename>
463 should be used. </para>
467 <term><filename>poweroff.target</filename></term>
469 <para>A special target unit
470 for shutting down and powering off the system.</para>
472 <para>Applications wanting to
473 power off the system should start
476 <para><filename>runlevel0.target</filename>
477 is an alias for this target
478 unit, for compatibility with SysV.</para>
482 <term><filename>printer.target</filename></term>
484 <para>This target is started
485 automatically as soon as a
486 printer is plugged in or
492 <term><filename>reboot.target</filename></term>
494 <para>A special target unit
495 for shutting down and rebooting the system.</para>
497 <para>Applications wanting to
498 reboot the system should start
501 <para><filename>runlevel6.target</filename>
502 is an alias for this target
503 unit, for compatibility with SysV.</para>
507 <term><filename>remote-fs.target</filename></term>
510 <filename>local-fs.target</filename>,
514 <para>systemd automatically
515 adds dependencies of type
516 After for this target unit to
517 all SysV init script service
518 units with an LSB header
520 <literal>$remote_fs</literal>
525 <term><filename>remote-fs-pre.target</filename></term>
527 <para>This target unit is
528 automatically ordered before
529 all remote mount points marked
530 with <option>auto</option>
531 (see above). It can be used to
532 execute certain units before
533 all remote mounts.</para>
537 <term><filename>rescue.target</filename></term>
539 <para>A special target unit
540 for setting up the base system
541 and a rescue shell.</para>
543 <para><filename>runlevel1.target</filename>
544 is an alias for this target
545 unit, for compatibility with SysV.</para>
549 <term><filename>rpcbind.target</filename></term>
551 <para>systemd automatically
552 adds dependencies of type
553 After for this target unit to
554 all SysV init script service
555 units with an LSB header
557 <literal>$rpcbind</literal>
562 <term><filename>runlevel2.target</filename></term>
564 <para>This is a target that is
565 called whenever the SysV
566 compatibility code asks for
567 runlevel 2. It is a good idea
568 to make this an alias for
570 <filename>multi-user.target</filename>.</para>
574 <term><filename>runlevel3.target</filename></term>
576 <para>This is a target that is
577 called whenever the SysV
578 compatibility code asks for
579 runlevel 3. It is a good idea
580 to make this an alias for
582 <filename>multi-user.target</filename>
584 <filename>graphical.target</filename>.</para>
588 <term><filename>runlevel4.target</filename></term>
590 <para>This is a target that is
591 called whenever the SysV
592 compatibility code asks for
593 runlevel 4. It is a good idea
594 to make this an alias for
596 <filename>multi-user.target</filename>
598 <filename>graphical.target</filename>.</para>
602 <term><filename>runlevel5.target</filename></term>
604 <para>This is a target that is
605 called whenever the SysV
606 compatibility code asks for
607 runlevel 5. It is a good idea
608 to make this an alias for
610 <filename>multi-user.target</filename>
612 <filename>graphical.target</filename>.</para>
616 <term><filename>shutdown.target</filename></term>
618 <para>A special target unit
619 that terminates the services
620 on system shutdown.</para>
622 <para>Services that shall be
623 terminated on system shutdown
625 dependencies to this unit for
626 their service unit, which is
628 <varname>DefaultDependencies=yes</varname>
629 is set (the default).</para>
631 <para>systemd automatically
632 adds dependencies of type
633 Conflicts to this target unit
634 for all SysV init script
635 service units that shall be
636 terminated in SysV runlevels 0
641 <term><filename>sigpwr.target</filename></term>
643 <para>A special target that is
644 started when systemd receives
645 the SIGPWR process signal,
646 which is normally sent by the
647 kernel or UPS daemons when
652 <term><filename>sleep.target</filename></term>
654 <para>A special target unit
656 <filename>suspend.target</filename>
658 <filename>hibernate.target</filename>
659 and may be used to hook units
665 <term><filename>smartcard.target</filename></term>
667 <para>This target is started
668 automatically as soon as a
669 smartcard controller is
670 plugged in or becomes
671 available at boot.</para>
675 <term><filename>sockets.target</filename></term>
677 <para>A special target unit
678 that sets up all service
681 <para>Services that can be
682 socket-activated shall add
683 Wants dependencies to this
684 unit for their socket unit
685 during installation.</para>
689 <term><filename>sound.target</filename></term>
691 <para>This target is started
692 automatically as soon as a
693 sound card is plugged in or
699 <term><filename>suspend.target</filename></term>
701 <para>A special target unit
703 system. This pulls in
704 <filename>sleep.target</filename>.</para>
708 <term><filename>swap.target</filename></term>
711 <filename>local-fs.target</filename>, but for swap
717 <term><filename>sysinit.target</filename></term>
719 <para>A special target unit
720 covering early boot-up scripts.</para>
721 <para>systemd automatically
722 adds dependencies of the types
723 Wants and After for all
724 SysV service units configured
725 for runlevels that are not 0
726 to 6 to this target unit.
727 This covers the special
728 boot-up runlevels some
729 distributions have, such as S
734 <term><filename>syslog.service</filename></term>
736 <para>The syslog service if
737 any. Implementations should
738 create a symlink from the
739 actual syslog implementation
740 to this generic name for
741 activating it.</para>
745 <term><filename>syslog.socket</filename></term>
747 <para>The socket unit where
748 syslog implementations should
749 listen on. All userspace log
750 messages will be made
756 <term><filename>syslog.target</filename></term>
758 <para>systemd automatically
759 adds dependencies of type
760 After for this target unit to
761 all SysV init script service
762 units with an LSB header
764 <literal>$syslog</literal>
769 <term><filename>system-update.target</filename></term>
771 <para>A special target unit
772 that is used for off-line
774 <citerefentry><refentrytitle>systemd-system-update-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
775 will redirect the boot process
777 <filename>/system-update</filename>
778 exists. For more information
780 url="http://freedesktop.org/wiki/Software/systemd/SystemUpdates">System
782 Specification</ulink>.</para>
786 <term><filename>time-sync.target</filename></term>
788 <para>systemd automatically
789 adds dependencies of type
790 After for this target unit to
791 all SysV init script service
792 units with an LSB header
794 <literal>$time</literal>
799 <term><filename>umount.target</filename></term>
801 <para>A special target unit
802 that umounts all mount and
803 automount points on system
806 <para>Mounts that shall be
807 unmounted on system shutdown
809 dependencies to this unit for
810 their mount unit, which is
812 <varname>DefaultDependencies=yes</varname>
813 is set (the default).</para>
821 <title>Special User Units</title>
823 <para>When systemd runs as a user instance, the
824 following special units are available, which have
825 similar definitions as their system counterparts:
826 <filename>default.target</filename>,
827 <filename>shutdown.target</filename>,
828 <filename>sockets.target</filename></para>
830 <para>In addition the following special unit is
831 understood only when systemd runs as service instance:</para>
835 <term><filename>exit.target</filename></term>
837 <para>A special service unit
838 for shutting down the
839 user service manager.</para>
841 <para>Applications wanting to
842 terminate the user service
843 manager should start this
844 unit. If systemd receives
845 SIGTERM or SIGINT when running
846 as user service daemon it will
847 start this unit.</para>
849 <para>Normally, this pulls in
850 <filename>shutdown.target</filename>
851 which in turn should be
852 conflicted by all units that
853 want to be shut down on
854 user service manager exit.</para>
861 <title>See Also</title>
863 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
864 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
865 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
866 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
867 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
868 <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>