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 General Public License as published by
12 the Free Software Foundation; either version 2 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 General Public License for more details.
20 You should have received a copy of the GNU 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>@SPECIAL_DBUS_SERVICE@</filename>,
54 <filename>default.target</filename>,
55 <filename>display-manager.service</filename>,
56 <filename>emergency.service</filename>,
57 <filename>exit.service</filename>,
58 <filename>graphical.target</filename>,
59 <filename>halt.target</filename>,
60 <filename>kbrequest.target</filename>,
61 <filename>local-fs.target</filename>,
62 <filename>mail-transfer-agent.target</filename>,
63 <filename>multi-user.target</filename>,
64 <filename>network.target</filename>,
65 <filename>nss-lookup.target</filename>,
66 <filename>poweroff.target</filename>,
67 <filename>reboot.target</filename>,
68 <filename>remote-fs.target</filename>,
69 <filename>rescue.target</filename>,
70 <filename>rpcbind.target</filename>,
71 <filename>rtc-set.target</filename>,
72 <filename>runlevel0.target</filename>,
73 <filename>runlevel1.target</filename>,
74 <filename>runlevel2.target</filename>,
75 <filename>runlevel3.target</filename>,
76 <filename>runlevel4.target</filename>,
77 <filename>runlevel5.target</filename>,
78 <filename>runlevel6.target</filename>
79 <filename>shutdown.target</filename>,
80 <filename>sigpwr.target</filename>,
81 <filename>sockets.target</filename>,
82 <filename>swap.target</filename>,
83 <filename>sysinit.target</filename>,
84 <filename>syslog.target</filename>,
85 <filename>@SPECIAL_SYSLOG_SERVICE@</filename>,
86 <filename>systemd-initctl.service</filename>,
87 <filename>systemd-initctl.socket</filename>,
88 <filename>systemd-logger.service</filename>,
89 <filename>systemd-logger.socket</filename></para>
93 <title>Description</title>
95 <para>A few units are treated specially by
96 systemd. They have special internal semantics and
97 cannot be renamed.</para>
101 <title>Special System Units</title>
105 <term><filename>basic.target</filename></term>
107 <para>A special target unit
108 covering early boot-up.</para>
109 <para>systemd automatically
110 adds dependencies of the types
111 Requires and After for this
112 target unit to all SysV
113 service units configured for
114 runlevel 1 to 5.</para>
115 <para>Usually this should pull
116 in all sockets, mount points,
117 swap devices and other basic
118 initialization necessary for
120 daemons. Most normal daemon
121 should have dependencies of
122 type After and Requires on
127 <term><filename>ctrl-alt-del.target</filename></term>
129 <para>systemd starts this
131 Control+Alt+Del is pressed on
132 the console. Usually this
133 should be aliased (symlinked)
135 <filename>reboot.target</filename>.</para>
139 <term><filename>@SPECIAL_DBUS_SERVICE@</filename></term>
141 <para>A special unit for the
142 D-Bus system bus. As soon as
143 this service is fully started
144 up systemd will connect to it
150 <term><filename>default.target</filename></term>
152 <para>The default unit systemd
153 starts at bootup. Usually this
154 should be aliased (symlinked)
156 <filename>multi-user.target</filename>
158 <filename>graphical.target</filename>.</para>
159 <para>The default unit systemd
160 starts at bootup can be
162 <varname>systemd.default=</varname>
163 kernel command line option.</para>
167 <term><filename>display-manager.service</filename></term>
169 <para>The display manager
170 service. Usually this should
171 be aliased (symlinked) to
172 <filename>gdm.service</filename>
173 or a similar display manager
175 <para>systemd automatically
176 adds dependencies of type
177 After for this target unit to
178 all SysV init script service
179 units with an LSB header
181 <literal>$x-display-manager</literal>
182 facility, for compatibility
187 <term><filename>emergency.service</filename></term>
189 <para>A special service unit
190 that starts an emergency
192 console. This unit is supposed
193 to be used with the kernel
195 <varname>systemd.default=</varname>
196 and has otherwise little use.
201 <term><filename>graphical.target</filename></term>
203 <para>A special target unit
204 for setting up a graphical
205 login screen. This pulls in
206 <filename>multi-user.target</filename>.</para>
208 <para>Units that are needed
209 for graphical login shall add
210 Wants dependencies for their
211 unit to this unit (or
212 <filename>multi-user.target</filename>)
213 during installation.</para>
217 <term><filename>halt.target</filename></term>
219 <para>A special target unit
220 for shutting down and halting the system.</para>
222 <para>Applications wanting to
223 halt the system should start
228 <term><filename>kbrequest.target</filename></term>
230 <para>systemd starts this
231 target whenever Alt+ArrowUp is
232 pressed on the console. This
233 is a good candidate to be
234 aliased (symlinked) to
235 <filename>rescue.target</filename>.</para>
239 <term><filename>local-fs.target</filename></term>
241 <para>systemd automatically
242 adds dependencies of type
243 After to all mount units that
244 refer to local mount points
245 for this target unit. In
246 addition, systemd adds
247 dependencies of type Wants to
248 this target unit for those
250 <filename>/etc/fstab</filename>
252 <literal>auto</literal> and
253 <literal>comment=systemd.mount</literal>
254 mount options set.</para>
256 <para>systemd automatically
257 adds dependencies of type
258 After for this target unit to
259 all SysV init script service
260 units with an LSB header
262 <literal>$local_fs</literal>
267 <term><filename>mail-transfer-agent.target</filename></term>
269 <para>The mail transfer agent
270 (MTA) service. Usually this
271 should pull in all units
273 sending/receiving mails on the
276 <para>systemd automatically
277 adds dependencies of type
278 After for this target unit to
279 all SysV init script service
280 units with an LSB header
282 <literal>$mail-transfer-argent</literal>
284 <literal>$mail-transport-agent</literal>
285 facilities, for compatibility
290 <term><filename>multi-user.target</filename></term>
292 <para>A special target unit
293 for setting up a multi-user
294 system (non-graphical). This
296 <filename>graphical.target</filename>.</para>
298 <para>Units that are needed
299 for a multi-user system shall
300 add Wants dependencies to
301 this unit for their unit during
306 <term><filename>network.target</filename></term>
308 <para>systemd automatically
309 adds dependencies of type
310 After for this target unit to
311 all SysV init script service
312 units with an LSB header
314 <literal>$network</literal>
319 <term><filename>nss-lookup.target</filename></term>
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>$named</literal>
332 <term><filename>poweroff.target</filename></term>
334 <para>A special target unit
335 for shutting down and powering off the system.</para>
337 <para>Applications wanting to
338 power off the system should start
341 <para><filename>runlevel0.target</filename>
342 is an alias for this target
343 unit, for compatibility with SysV.</para>
347 <term><filename>reboot.target</filename></term>
349 <para>A special target unit
350 for shutting down and rebooting the system.</para>
352 <para>Applications wanting to
353 reboot the system should start
356 <para><filename>runlevel6.target</filename>
357 is an alias for this target
358 unit, for compatibility with SysV.</para>
362 <term><filename>remote-fs.target</filename></term>
365 <filename>local-fs.target</filename>,
369 <para>systemd automatically
370 adds dependencies of type
371 After for this target unit to
372 all SysV init script service
373 units with an LSB header
375 <literal>$remote_fs</literal>
380 <term><filename>rescue.target</filename></term>
382 <para>A special target unit
383 for setting up the base system
384 and a rescue shell.</para>
386 <para><filename>runlevel1.target</filename>
387 is an alias for this target
388 unit, for compatibility with SysV.</para>
392 <term><filename>rpcbind.target</filename></term>
394 <para>systemd automatically
395 adds dependencies of type
396 After for this target unit to
397 all SysV init script service
398 units with an LSB header
400 <literal>$rpcbind</literal>
405 <term><filename>rtc-set.target</filename></term>
407 <para>systemd automatically
408 adds dependencies of type
409 After for this target unit to
410 all SysV init script service
411 units with an LSB header
413 <literal>$time</literal>
418 <term><filename>runlevel0.target</filename></term>
420 <para>This is a target that is
421 called whever the SysV
422 compatibility code asks for
423 runlevel 0. This is an alias
425 <filename>poweroff.target</filename>,
426 for compatibility with
431 <term><filename>runlevel1.target</filename></term>
433 <para>This is a target that is
434 called whever the SysV
435 compatibility code asks for
436 runlevel 1. This is an alias
438 <filename>rescue.target</filename>,
439 for compatibility with
444 <term><filename>runlevel2.target</filename></term>
446 <para>This is a target that is
447 called whever the SysV
448 compatibility code asks for
449 runlevel 2. It is a good idea
450 to make this an alias for
452 <filename>multi-user.target</filename>.</para>
456 <term><filename>runlevel3.target</filename></term>
458 <para>This is a target that is
459 called whever the SysV
460 compatibility code asks for
461 runlevel 3. It is a good idea
462 to make this an alias for
464 <filename>multi-user.target</filename>
466 <filename>graphical.target</filename>.</para>
470 <term><filename>runlevel4.target</filename></term>
472 <para>This is a target that is
473 called whever the SysV
474 compatibility code asks for
475 runlevel 4. It is a good idea
476 to make this an alias for
478 <filename>multi-user.target</filename>
480 <filename>graphical.target</filename>.</para>
484 <term><filename>runlevel5.target</filename></term>
486 <para>This is a target that is
487 called whever the SysV
488 compatibility code asks for
489 runlevel 5. It is a good idea
490 to make this an alias for
492 <filename>multi-user.target</filename>
494 <filename>graphical.target</filename>.</para>
498 <term><filename>runlevel6.target</filename></term>
500 <para>This is a target that is
501 called whever the SysV
502 compatibility code asks for
503 runlevel 6. This is an alias
505 <filename>reboot.target</filename>,
506 for compatibility with
511 <term><filename>shutdown.target</filename></term>
513 <para>A special target unit
514 that terminates the services
515 on system shutdown.</para>
517 <para>Services that shall be
518 terminated on system shutdown
520 dependencies to this unit for
521 their service unit during
524 <para>systemd automatically
525 adds dependencies of type
526 Conflicts to this target unit
527 for all SysV init script
528 service units that shall be
529 terminated in SysV runlevels 0
534 <term><filename>sigpwr.target</filename></term>
536 <para>A special target that is
537 started when systemd receives
538 the SIGPWR process signal,
539 which is normally sent by the
540 kernel or UPS daemons when
545 <term><filename>sockets.target</filename></term>
547 <para>A special target unit
548 that sets up all service
551 <para>Services that can be
552 socket-activated shall add
553 Wants dependencies to this
554 unit for their socket unit
555 during installation.</para>
559 <term><filename>swap.target</filename></term>
562 <filename>local-fs.target</filename>, but for swap
568 <term><filename>syslog.target</filename></term>
570 <para>systemd automatically
571 adds dependencies of type
572 After for this target unit to
573 all SysV init script service
574 units with an LSB header
576 <literal>$syslog</literal>
579 <para>Administrators should
580 ensure that this target pulls
581 in a service unit with the
583 <filename>@SPECIAL_SYSLOG_SERVICE@</filename>
584 (or a socket unit that
590 <term><filename>sysinit.target</filename></term>
592 <para>A special target unit
593 covering early boot-up scripts.</para>
594 <para>systemd automatically
595 adds dependencies of the types
596 Wants and After for all
597 SysV service units configured
598 for runlevels that are not 0
599 to 6 to this target unit.
600 This covers the special
601 boot-up runlevels some
602 distributions have, such as S
607 <term><filename>@SPECIAL_SYSLOG_SERVICE@</filename></term>
609 <para>A special unit for the
610 syslog daemon. As soon as
611 this service is fully started
612 up systemd will connect to it
613 and use it for logging if it
614 has been configured for
616 <para>Applications should
617 generally not depend on this
618 service, and depend on
619 <filename>syslog.target</filename>
624 <term><filename>systemd-initctl.service</filename></term>
627 compatibility with the SysV
628 /dev/initctl file system FIFO
629 for communication with the
632 socket-activated service, see
633 <filename>system-initctl.socket</filename>.</para>
637 <term><filename>systemd-initctl.socket</filename></term>
639 <para>Socket activation unit
641 <filename>system-initctl.service</filename>.</para>
645 <term><filename>systemd-logger.service</filename></term>
647 <para>This is internally used
648 by systemd to provide syslog
649 logging to the processes it
652 socket-activated service, see
653 <filename>system-logger.socket</filename>.</para>
657 <term><filename>systemd-logger.socket</filename></term>
659 <para>Socket activation unit
661 <filename>system-logger.service</filename>. systemd
662 will automatically add
663 dependencies of types Requires
664 and After to all units that
665 have been configured for
666 stdout or stderr to be
667 connected to syslog or the
668 kernel log buffer.</para>
675 <title>Special Session Units</title>
677 <para>When systemd runs as a service instance, the
678 following special units are available, which have
679 similar definitions as their system counterparts:
680 <filename>default.target</filename>,
681 <filename>local-fs.target</filename>,
682 <filename>remote-fs.target</filename>,
683 <filename>shutdown.target</filename>,
684 <filename>sockets.target</filename>,
685 <filename>swap.target</filename>.</para>
687 <para>In addition the following special unit is
688 understood only when systemd runs as service instance:</para>
692 <term><filename>exit.service</filename></term>
694 <para>A special service unit
695 for shutting down the
698 <para>Applications wanting to
699 terminate the session should
700 start this unit. If systemd
701 receives SIGTERM or SIGINT
702 when running as session daemon
706 <para>Normally, this pulls in
707 <filename>shutdown.target</filename>
708 which in turn should be
709 conflicted by all units that
710 want to be shut down on
718 <title>See Also</title>
720 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
721 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
722 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>
723 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>