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>ctrl-alt-del.target</filename>,
53 <filename>dbus.service</filename>,
54 <filename>dbus.socket</filename>,
55 <filename>default.target</filename>,
56 <filename>display-manager.service</filename>,
57 <filename>emergency.target</filename>,
58 <filename>exit.service</filename>,
59 <filename>final.service</filename>,
60 <filename>graphical.target</filename>,
61 <filename>hibernate.target</filename>,
62 <filename>http-daemon.target</filename>,
63 <filename>halt.target</filename>,
64 <filename>kbrequest.target</filename>,
65 <filename>kexec.target</filename>,
66 <filename>local-fs.target</filename>,
67 <filename>local-fs-pre.target</filename>,
68 <filename>mail-transfer-agent.target</filename>,
69 <filename>multi-user.target</filename>,
70 <filename>network.target</filename>,
71 <filename>nss-lookup.target</filename>,
72 <filename>poweroff.target</filename>,
73 <filename>reboot.target</filename>,
74 <filename>remote-fs.target</filename>,
75 <filename>remote-fs-pre.target</filename>,
76 <filename>rescue.target</filename>,
77 <filename>rpcbind.target</filename>,
78 <filename>runlevel2.target</filename>,
79 <filename>runlevel3.target</filename>,
80 <filename>runlevel4.target</filename>,
81 <filename>runlevel5.target</filename>,
82 <filename>shutdown.target</filename>,
83 <filename>sigpwr.target</filename>,
84 <filename>sleep.target</filename>,
85 <filename>sockets.target</filename>,
86 <filename>suspend.target</filename>,
87 <filename>swap.target</filename>,
88 <filename>sysinit.target</filename>,
89 <filename>syslog.service</filename>,
90 <filename>syslog.socket</filename>,
91 <filename>syslog.target</filename>,
92 <filename>time-sync.target</filename>,
93 <filename>umount.target</filename></para>
97 <title>Description</title>
99 <para>A few units are treated specially by
100 systemd. They have special internal semantics and
101 cannot be renamed.</para>
105 <title>Special System Units</title>
109 <term><filename>basic.target</filename></term>
111 <para>A special target unit
112 covering early boot-up.</para>
113 <para>systemd automatically
114 adds dependencies of the types
115 Requires and After for this
116 target unit to all SysV
117 service units configured for
118 runlevel 1 to 5.</para>
119 <para>Usually this should pull-in
120 all sockets, mount points,
121 swap devices and other basic
122 initialization necessary for
124 daemons. Most normal daemons
125 should have dependencies of
126 type After and Requires on
131 <term><filename>ctrl-alt-del.target</filename></term>
133 <para>systemd starts this
135 Control+Alt+Del is pressed on
136 the console. Usually this
137 should be aliased (symlinked)
139 <filename>reboot.target</filename>.</para>
143 <term><filename>dbus.service</filename></term>
145 <para>A special unit for the
146 D-Bus system bus. As soon as
147 this service is fully started
148 up systemd will connect to it
154 <term><filename>dbus.socket</filename></term>
156 <para>A special unit for the
157 D-Bus system bus socket. All
159 <literal>Type=dbus</literal>
166 <term><filename>default.target</filename></term>
168 <para>The default unit systemd
169 starts at bootup. Usually this
170 should be aliased (symlinked)
172 <filename>multi-user.target</filename>
174 <filename>graphical.target</filename>.</para>
175 <para>The default unit systemd
176 starts at bootup can be
178 <varname>systemd.unit=</varname>
179 kernel command line option.</para>
183 <term><filename>display-manager.service</filename></term>
185 <para>The display manager
186 service. Usually this should
187 be aliased (symlinked) to
188 <filename>gdm.service</filename>
189 or a similar display manager
191 <para>systemd automatically
192 adds dependencies of type
193 After for this target unit to
194 all SysV init script service
195 units with a LSB header
197 <literal>$x-display-manager</literal>
198 facility, for compatibility
203 <term><filename>emergency.target</filename></term>
205 <para>A special target unit
206 that starts an emergency
208 console. This unit is supposed
209 to be used with the kernel
211 <varname>systemd.unit=</varname>
212 and has otherwise little use.
217 <term><filename>final.target</filename></term>
219 <para>A special target unit
220 that is used during the
221 shutdown logic and may be used
222 to pull in late services after
223 all normal services are
224 already terminated and all
230 <term><filename>graphical.target</filename></term>
232 <para>A special target unit
233 for setting up a graphical
234 login screen. This pulls in
235 <filename>multi-user.target</filename>.</para>
237 <para>Units that are needed
238 for graphical login shall add
239 Wants dependencies for their
240 unit to this unit (or
241 <filename>multi-user.target</filename>)
242 during installation.</para>
246 <term><filename>hibernate.target</filename></term>
248 <para>A special target unit
250 system. This pulls in
251 <filename>sleep.target</filename>.</para>
255 <term><filename>http-daemon.target</filename></term>
257 <para>A target for pulling in
258 an HTTP server if there is
260 <para>systemd automatically
261 adds dependencies of type
262 After for this target unit to
263 all SysV init script service
264 units with a LSB header
266 <literal>$httpd</literal>
271 <term><filename>halt.target</filename></term>
273 <para>A special target unit
274 for shutting down and halting the system.</para>
276 <para>Applications wanting to
277 halt the system should start
282 <term><filename>kbrequest.target</filename></term>
284 <para>systemd starts this
285 target whenever Alt+ArrowUp is
286 pressed on the console. This
287 is a good candidate to be
288 aliased (symlinked) to
289 <filename>rescue.target</filename>.</para>
293 <term><filename>kexec.target</filename></term>
295 <para>A special target unit
296 for shutting down and rebooting the system via kexec.</para>
298 <para>Applications wanting to
299 reboot the system with kexec should start
304 <term><filename>local-fs.target</filename></term>
306 <para>systemd automatically
307 adds dependencies of type
308 After to all mount units that
309 refer to local mount points
310 for this target unit. In
311 addition, systemd adds
312 dependencies of type Wants to
313 this target unit for those
315 <filename>/etc/fstab</filename>
317 <option>auto</option> and
318 <option>comment=systemd.mount</option>
319 mount options set.</para>
321 <para>systemd automatically
322 adds dependencies of type
323 After for this target unit to
324 all SysV init script service
325 units with an LSB header
327 <literal>$local_fs</literal>
332 <term><filename>local-fs-pre.target</filename></term>
334 <para>This target unit is
335 automatically ordered before
336 all local mount points marked
337 with <option>auto</option>
338 (see above). It can be used to
339 execute certain units before
340 all local mounts.</para>
344 <term><filename>mail-transfer-agent.target</filename></term>
346 <para>The mail transfer agent
347 (MTA) service. Usually this
348 should pull-in all units
350 sending/receiving mails on the
353 <para>systemd automatically
354 adds dependencies of type
355 After for this target unit to
356 all SysV init script service
357 units with an LSB header
359 <literal>$mail-transfer-agent</literal>
361 <literal>$mail-transport-agent</literal>
362 facilities, for compatibility
367 <term><filename>multi-user.target</filename></term>
369 <para>A special target unit
370 for setting up a multi-user
371 system (non-graphical). This
373 <filename>graphical.target</filename>.</para>
375 <para>Units that are needed
376 for a multi-user system shall
377 add Wants dependencies to
378 this unit for their unit during
383 <term><filename>network.target</filename></term>
385 <para>systemd automatically
386 adds dependencies of type
387 After for this target unit to
388 all SysV init script service
389 units with an LSB header
391 <literal>$network</literal>
396 <term><filename>nss-lookup.target</filename></term>
398 <para>A target that should be
399 used as synchronization point
400 for all host/network name
401 service lookups. Note that
402 this is independent of
403 user/group name lookups for
405 <filename>nss-user-lookup.target</filename>
406 should be used. systemd
408 dependencies of type After for
409 this target unit to all SysV
410 init script service units with
411 an LSB header referring to the
412 <literal>$named</literal>
417 <term><filename>nss-user-lookup.target</filename></term>
419 <para>A target that should be
420 used as synchronization point
421 for all user/group name
422 service lookups. Note that
423 this is independent of
424 host/network name lookups for
426 <filename>nss-lookup.target</filename>
427 should be used. </para>
431 <term><filename>poweroff.target</filename></term>
433 <para>A special target unit
434 for shutting down and powering off the system.</para>
436 <para>Applications wanting to
437 power off the system should start
440 <para><filename>runlevel0.target</filename>
441 is an alias for this target
442 unit, for compatibility with SysV.</para>
446 <term><filename>reboot.target</filename></term>
448 <para>A special target unit
449 for shutting down and rebooting the system.</para>
451 <para>Applications wanting to
452 reboot the system should start
455 <para><filename>runlevel6.target</filename>
456 is an alias for this target
457 unit, for compatibility with SysV.</para>
461 <term><filename>remote-fs.target</filename></term>
464 <filename>local-fs.target</filename>,
468 <para>systemd automatically
469 adds dependencies of type
470 After for this target unit to
471 all SysV init script service
472 units with an LSB header
474 <literal>$remote_fs</literal>
479 <term><filename>remote-fs-pre.target</filename></term>
481 <para>This target unit is
482 automatically ordered before
483 all remote mount points marked
484 with <option>auto</option>
485 (see above). It can be used to
486 execute certain units before
487 all remote mounts.</para>
491 <term><filename>rescue.target</filename></term>
493 <para>A special target unit
494 for setting up the base system
495 and a rescue shell.</para>
497 <para><filename>runlevel1.target</filename>
498 is an alias for this target
499 unit, for compatibility with SysV.</para>
503 <term><filename>rpcbind.target</filename></term>
505 <para>systemd automatically
506 adds dependencies of type
507 After for this target unit to
508 all SysV init script service
509 units with an LSB header
511 <literal>$rpcbind</literal>
516 <term><filename>runlevel2.target</filename></term>
518 <para>This is a target that is
519 called whenever the SysV
520 compatibility code asks for
521 runlevel 2. It is a good idea
522 to make this an alias for
524 <filename>multi-user.target</filename>.</para>
528 <term><filename>runlevel3.target</filename></term>
530 <para>This is a target that is
531 called whenever the SysV
532 compatibility code asks for
533 runlevel 3. It is a good idea
534 to make this an alias for
536 <filename>multi-user.target</filename>
538 <filename>graphical.target</filename>.</para>
542 <term><filename>runlevel4.target</filename></term>
544 <para>This is a target that is
545 called whenever the SysV
546 compatibility code asks for
547 runlevel 4. It is a good idea
548 to make this an alias for
550 <filename>multi-user.target</filename>
552 <filename>graphical.target</filename>.</para>
556 <term><filename>runlevel5.target</filename></term>
558 <para>This is a target that is
559 called whenever the SysV
560 compatibility code asks for
561 runlevel 5. It is a good idea
562 to make this an alias for
564 <filename>multi-user.target</filename>
566 <filename>graphical.target</filename>.</para>
570 <term><filename>shutdown.target</filename></term>
572 <para>A special target unit
573 that terminates the services
574 on system shutdown.</para>
576 <para>Services that shall be
577 terminated on system shutdown
579 dependencies to this unit for
580 their service unit, which is
582 <varname>DefaultDependencies=yes</varname>
583 is set (the default).</para>
585 <para>systemd automatically
586 adds dependencies of type
587 Conflicts to this target unit
588 for all SysV init script
589 service units that shall be
590 terminated in SysV runlevels 0
595 <term><filename>sigpwr.target</filename></term>
597 <para>A special target that is
598 started when systemd receives
599 the SIGPWR process signal,
600 which is normally sent by the
601 kernel or UPS daemons when
606 <term><filename>sleep.target</filename></term>
608 <para>A special target unit
610 <filename>suspend.target</filename>
612 <filename>hibernate.target</filename>
613 and may be used to hook units
619 <term><filename>sockets.target</filename></term>
621 <para>A special target unit
622 that sets up all service
625 <para>Services that can be
626 socket-activated shall add
627 Wants dependencies to this
628 unit for their socket unit
629 during installation.</para>
633 <term><filename>suspend.target</filename></term>
635 <para>A special target unit
637 system. This pulls in
638 <filename>sleep.target</filename>.</para>
642 <term><filename>swap.target</filename></term>
645 <filename>local-fs.target</filename>, but for swap
651 <term><filename>sysinit.target</filename></term>
653 <para>A special target unit
654 covering early boot-up scripts.</para>
655 <para>systemd automatically
656 adds dependencies of the types
657 Wants and After for all
658 SysV service units configured
659 for runlevels that are not 0
660 to 6 to this target unit.
661 This covers the special
662 boot-up runlevels some
663 distributions have, such as S
668 <term><filename>syslog.service</filename></term>
670 <para>The syslog service if
671 any. Implementations should
672 create a symlink from the
673 actual syslog implementation
674 to this generic name for
675 activating it.</para>
679 <term><filename>syslog.socket</filename></term>
681 <para>The socket unit where
682 syslog implementations should
683 listen on. All userspace log
684 messages will be made
690 <term><filename>syslog.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>$syslog</literal>
703 <term><filename>time-sync.target</filename></term>
705 <para>systemd automatically
706 adds dependencies of type
707 After for this target unit to
708 all SysV init script service
709 units with an LSB header
711 <literal>$time</literal>
716 <term><filename>umount.target</filename></term>
718 <para>A special target unit
719 that umounts all mount and
720 automount points on system
723 <para>Mounts that shall be
724 unmounted on system shutdown
726 dependencies to this unit for
727 their mount unit, which is
729 <varname>DefaultDependencies=yes</varname>
730 is set (the default).</para>
737 <title>Special User Units</title>
739 <para>When systemd runs as a user instance, the
740 following special units are available, which have
741 similar definitions as their system counterparts:
742 <filename>default.target</filename>,
743 <filename>shutdown.target</filename>,
744 <filename>sockets.target</filename></para>
746 <para>In addition the following special unit is
747 understood only when systemd runs as service instance:</para>
751 <term><filename>exit.service</filename></term>
753 <para>A special service unit
754 for shutting down the
755 user service manager.</para>
757 <para>Applications wanting to
758 terminate the user service
759 manager should start this
760 unit. If systemd receives
761 SIGTERM or SIGINT when running
762 as user service daemon it will
763 start this unit.</para>
765 <para>Normally, this pulls in
766 <filename>shutdown.target</filename>
767 which in turn should be
768 conflicted by all units that
769 want to be shut down on
770 user service manager exit.</para>
777 <title>See Also</title>
779 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
780 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
781 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
782 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
783 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>