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>dbus.service</filename>,
54 <filename>dbus.target</filename>,
55 <filename>default.target</filename>,
56 <filename>display-manager.service</filename>,
57 <filename>emergency.target</filename>,
58 <filename>exit.service</filename>,
59 <filename>graphical.target</filename>,
60 <filename>halt.target</filename>,
61 <filename>kbrequest.target</filename>,
62 <filename>local-fs.target</filename>,
63 <filename>mail-transfer-agent.target</filename>,
64 <filename>multi-user.target</filename>,
65 <filename>network.target</filename>,
66 <filename>nss-lookup.target</filename>,
67 <filename>poweroff.target</filename>,
68 <filename>reboot.target</filename>,
69 <filename>remote-fs.target</filename>,
70 <filename>rescue.target</filename>,
71 <filename>rpcbind.target</filename>,
72 <filename>rtc-set.target</filename>,
73 <filename>runlevel2.target</filename>,
74 <filename>runlevel3.target</filename>,
75 <filename>runlevel4.target</filename>,
76 <filename>runlevel5.target</filename>,
77 <filename>shutdown.target</filename>,
78 <filename>sigpwr.target</filename>,
79 <filename>sockets.target</filename>,
80 <filename>swap.target</filename>,
81 <filename>sysinit.target</filename>,
82 <filename>@SPECIAL_SYSLOG_SERVICE@</filename>,
83 <filename>syslog.target</filename>,
84 <filename>systemd-initctl.service</filename>,
85 <filename>systemd-initctl.socket</filename>,
86 <filename>systemd-logger.service</filename>,
87 <filename>systemd-logger.socket</filename>,
88 <filename>umount.target</filename></para>
92 <title>Description</title>
94 <para>A few units are treated specially by
95 systemd. They have special internal semantics and
96 cannot be renamed.</para>
100 <title>Special System Units</title>
104 <term><filename>basic.target</filename></term>
106 <para>A special target unit
107 covering early boot-up.</para>
108 <para>systemd automatically
109 adds dependencies of the types
110 Requires and After for this
111 target unit to all SysV
112 service units configured for
113 runlevel 1 to 5.</para>
114 <para>Usually this should pull-in
115 all sockets, mount points,
116 swap devices and other basic
117 initialization necessary for
119 daemons. Most normal daemons
120 should have dependencies of
121 type After and Requires on
126 <term><filename>ctrl-alt-del.target</filename></term>
128 <para>systemd starts this
130 Control+Alt+Del is pressed on
131 the console. Usually this
132 should be aliased (symlinked)
134 <filename>reboot.target</filename>.</para>
138 <term><filename>dbus.service</filename></term>
140 <para>A special unit for the
141 D-Bus system bus. As soon as
142 this service is fully started
143 up systemd will connect to it
147 <para>Units should generally
148 avoid depending on this unit
149 directly and instead refer to
151 <filename>dbus.target</filename>
152 unit instead, which pulls this
153 one in directly or indirectly
154 via socket-based activation.</para>
158 <term><filename>dbus.target</filename></term>
160 <para>Administrators should
161 ensure that this target pulls
162 in a service unit with the
164 <filename>dbus.service</filename>
165 (or a socket unit that
171 <term><filename>default.target</filename></term>
173 <para>The default unit systemd
174 starts at bootup. Usually this
175 should be aliased (symlinked)
177 <filename>multi-user.target</filename>
179 <filename>graphical.target</filename>.</para>
180 <para>The default unit systemd
181 starts at bootup can be
183 <varname>systemd.default=</varname>
184 kernel command line option.</para>
188 <term><filename>display-manager.service</filename></term>
190 <para>The display manager
191 service. Usually this should
192 be aliased (symlinked) to
193 <filename>xdm.service</filename>
194 or a similar display manager
196 <para>systemd automatically
197 adds dependencies of type
198 After for this target unit to
199 all SysV init script service
200 units with a LSB header
202 <literal>$x-display-manager</literal>
203 facility, for compatibility
208 <term><filename>emergency.target</filename></term>
210 <para>A special target unit
211 that starts an emergency
213 console. This unit is supposed
214 to be used with the kernel
216 <varname>systemd.default=</varname>
217 and has otherwise little use.
222 <term><filename>graphical.target</filename></term>
224 <para>A special target unit
225 for setting up a graphical
226 login screen. This pulls in
227 <filename>multi-user.target</filename>.</para>
229 <para>Units that are needed
230 for graphical login shall add
231 Wants dependencies for their
232 unit to this unit (or
233 <filename>multi-user.target</filename>)
234 during installation.</para>
238 <term><filename>halt.target</filename></term>
240 <para>A special target unit
241 for shutting down and halting the system.</para>
243 <para>Applications wanting to
244 halt the system should start
249 <term><filename>kbrequest.target</filename></term>
251 <para>systemd starts this
252 target whenever Alt+ArrowUp is
253 pressed on the console. This
254 is a good candidate to be
255 aliased (symlinked) to
256 <filename>rescue.target</filename>.</para>
260 <term><filename>local-fs.target</filename></term>
262 <para>systemd automatically
263 adds dependencies of type
264 After to all mount units that
265 refer to local mount points
266 for this target unit. In
267 addition, systemd adds
268 dependencies of type Wants to
269 this target unit for those
271 <filename>/etc/fstab</filename>
273 <option>auto</option> and
274 <option>comment=systemd.mount</option>
275 mount options set.</para>
277 <para>systemd automatically
278 adds dependencies of type
279 After for this target unit to
280 all SysV init script service
281 units with an LSB header
283 <literal>$local_fs</literal>
288 <term><filename>mail-transfer-agent.target</filename></term>
290 <para>The mail transfer agent
291 (MTA) service. Usually this
292 should pull-in all units
294 sending/receiving mails on the
297 <para>systemd automatically
298 adds dependencies of type
299 After for this target unit to
300 all SysV init script service
301 units with an LSB header
303 <literal>$mail-transfer-argent</literal>
305 <literal>$mail-transport-agent</literal>
306 facilities, for compatibility
311 <term><filename>multi-user.target</filename></term>
313 <para>A special target unit
314 for setting up a multi-user
315 system (non-graphical). This
317 <filename>graphical.target</filename>.</para>
319 <para>Units that are needed
320 for a multi-user system shall
321 add Wants dependencies to
322 this unit for their unit during
327 <term><filename>network.target</filename></term>
329 <para>systemd automatically
330 adds dependencies of type
331 After for this target unit to
332 all SysV init script service
333 units with an LSB header
335 <literal>$network</literal>
340 <term><filename>nss-lookup.target</filename></term>
342 <para>systemd automatically
343 adds dependencies of type
344 After for this target unit to
345 all SysV init script service
346 units with an LSB header
348 <literal>$named</literal>
353 <term><filename>poweroff.target</filename></term>
355 <para>A special target unit
356 for shutting down and powering off the system.</para>
358 <para>Applications wanting to
359 power off the system should start
362 <para><filename>runlevel0.target</filename>
363 is an alias for this target
364 unit, for compatibility with SysV.</para>
368 <term><filename>reboot.target</filename></term>
370 <para>A special target unit
371 for shutting down and rebooting the system.</para>
373 <para>Applications wanting to
374 reboot the system should start
377 <para><filename>runlevel6.target</filename>
378 is an alias for this target
379 unit, for compatibility with SysV.</para>
383 <term><filename>remote-fs.target</filename></term>
386 <filename>local-fs.target</filename>,
390 <para>systemd automatically
391 adds dependencies of type
392 After for this target unit to
393 all SysV init script service
394 units with an LSB header
396 <literal>$remote_fs</literal>
401 <term><filename>rescue.target</filename></term>
403 <para>A special target unit
404 for setting up the base system
405 and a rescue shell.</para>
407 <para><filename>runlevel1.target</filename>
408 is an alias for this target
409 unit, for compatibility with SysV.</para>
413 <term><filename>rpcbind.target</filename></term>
415 <para>systemd automatically
416 adds dependencies of type
417 After for this target unit to
418 all SysV init script service
419 units with an LSB header
421 <literal>$rpcbind</literal>
426 <term><filename>rtc-set.target</filename></term>
428 <para>systemd automatically
429 adds dependencies of type
430 After for this target unit to
431 all SysV init script service
432 units with an LSB header
434 <literal>$time</literal>
439 <term><filename>runlevel2.target</filename></term>
441 <para>This is a target that is
442 called whever the SysV
443 compatibility code asks for
444 runlevel 2. It is a good idea
445 to make this an alias for
447 <filename>multi-user.target</filename>.</para>
451 <term><filename>runlevel3.target</filename></term>
453 <para>This is a target that is
454 called whever the SysV
455 compatibility code asks for
456 runlevel 3. It is a good idea
457 to make this an alias for
459 <filename>multi-user.target</filename>
461 <filename>graphical.target</filename>.</para>
465 <term><filename>runlevel4.target</filename></term>
467 <para>This is a target that is
468 called whever the SysV
469 compatibility code asks for
470 runlevel 4. It is a good idea
471 to make this an alias for
473 <filename>multi-user.target</filename>
475 <filename>graphical.target</filename>.</para>
479 <term><filename>runlevel5.target</filename></term>
481 <para>This is a target that is
482 called whever the SysV
483 compatibility code asks for
484 runlevel 5. It is a good idea
485 to make this an alias for
487 <filename>multi-user.target</filename>
489 <filename>graphical.target</filename>.</para>
493 <term><filename>shutdown.target</filename></term>
495 <para>A special target unit
496 that terminates the services
497 on system shutdown.</para>
499 <para>Services that shall be
500 terminated on system shutdown
502 dependencies to this unit for
503 their service unit, which is
505 <varname>DefaultDependencies=yes</varname>
506 is set (the default).</para>
508 <para>systemd automatically
509 adds dependencies of type
510 Conflicts to this target unit
511 for all SysV init script
512 service units that shall be
513 terminated in SysV runlevels 0
518 <term><filename>sigpwr.target</filename></term>
520 <para>A special target that is
521 started when systemd receives
522 the SIGPWR process signal,
523 which is normally sent by the
524 kernel or UPS daemons when
529 <term><filename>sockets.target</filename></term>
531 <para>A special target unit
532 that sets up all service
535 <para>Services that can be
536 socket-activated shall add
537 Wants dependencies to this
538 unit for their socket unit
539 during installation.</para>
543 <term><filename>swap.target</filename></term>
546 <filename>local-fs.target</filename>, but for swap
552 <term><filename>sysinit.target</filename></term>
554 <para>A special target unit
555 covering early boot-up scripts.</para>
556 <para>systemd automatically
557 adds dependencies of the types
558 Wants and After for all
559 SysV service units configured
560 for runlevels that are not 0
561 to 6 to this target unit.
562 This covers the special
563 boot-up runlevels some
564 distributions have, such as S
569 <term><filename>@SPECIAL_SYSLOG_SERVICE@</filename></term>
571 <para>A special unit for the
572 syslog daemon. As soon as
573 this service is fully started
574 up systemd will connect to it
575 and use it for logging if it
576 has been configured for
579 <para>Units should generally
580 avoid depending on this unit
581 directly and instead refer to
583 <filename>syslog.target</filename>
584 unit instead, which pulls this
585 one in directly or indirectly
586 via socket-based activation.</para>
590 <term><filename>syslog.target</filename></term>
592 <para>systemd automatically
593 adds dependencies of type
594 After for this target unit to
595 all SysV init script service
596 units with an LSB header
598 <literal>$syslog</literal>
601 <para>Administrators should
602 ensure that this target pulls
603 in a service unit with the
605 <filename>@SPECIAL_SYSLOG_SERVICE@</filename>
606 (or a socket unit that
612 <term><filename>systemd-initctl.service</filename></term>
615 compatibility with the SysV
616 /dev/initctl file system FIFO
617 for communication with the
620 socket-activated service, see
621 <filename>system-initctl.socket</filename>.</para>
625 <term><filename>systemd-initctl.socket</filename></term>
627 <para>Socket activation unit
629 <filename>system-initctl.service</filename>.</para>
633 <term><filename>systemd-logger.service</filename></term>
635 <para>This is internally used
636 by systemd to provide syslog
637 logging to the processes it
640 socket-activated service, see
641 <filename>system-logger.socket</filename>.</para>
645 <term><filename>systemd-logger.socket</filename></term>
647 <para>Socket activation unit
649 <filename>system-logger.service</filename>. systemd
650 will automatically add
651 dependencies of types Requires
652 and After to all units that
653 have been configured for
654 stdout or stderr to be
655 connected to syslog or the
656 kernel log buffer.</para>
660 <term><filename>umount.target</filename></term>
662 <para>A special target unit
663 that umounts all mount and
664 automount points on system
667 <para>Mounts that shall be
668 unmounted on system shutdown
670 dependencies to this unit for
671 their mount unit, which is
673 <varname>DefaultDependencies=yes</varname>
674 is set (the default).</para>
681 <title>Special Session Units</title>
683 <para>When systemd runs as a service instance, the
684 following special units are available, which have
685 similar definitions as their system counterparts:
686 <filename>default.target</filename>,
687 <filename>local-fs.target</filename>,
688 <filename>remote-fs.target</filename>,
689 <filename>shutdown.target</filename>,
690 <filename>sockets.target</filename>,
691 <filename>swap.target</filename>.</para>
693 <para>In addition the following special unit is
694 understood only when systemd runs as service instance:</para>
698 <term><filename>exit.service</filename></term>
700 <para>A special service unit
701 for shutting down the
704 <para>Applications wanting to
705 terminate the session should
706 start this unit. If systemd
707 receives SIGTERM or SIGINT
708 when running as session daemon
712 <para>Normally, this pulls in
713 <filename>shutdown.target</filename>
714 which in turn should be
715 conflicted by all units that
716 want to be shut down on
724 <title>See Also</title>
726 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
727 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
728 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>
729 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>