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>syslog.target</filename>,
84 <filename>@SPECIAL_SYSLOG_SERVICE@</filename>,
85 <filename>systemd-initctl.service</filename>,
86 <filename>systemd-initctl.socket</filename>,
87 <filename>systemd-logger.service</filename>,
88 <filename>systemd-logger.socket</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>systemd automatically
115 adds dependencies of the types
116 Wants and After for all
117 SysV service units configured
118 for runlevels that are not 0
119 to 6 to this target unit.
120 This covers the special
121 boot-up runlevels some
122 distributions have, such as S
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>@SPECIAL_SYSLOG_SERVICE@</filename></term>
592 <para>A special unit for the
593 syslog daemon. As soon as
594 this service is fully started
595 up systemd will connect to it
596 and use it for logging if it
597 has been configured for
599 <para>Applications should
600 generally not depend on this
601 service, and depend on
602 <filename>syslog.target</filename>
607 <term><filename>systemd-initctl.service</filename></term>
610 compatibility with the SysV
611 /dev/initctl file system FIFO
612 for communication with the
615 socket-activated service, see
616 <filename>system-initctl.socket</filename>.</para>
620 <term><filename>systemd-initctl.socket</filename></term>
622 <para>Socket activation unit
624 <filename>system-initctl.service</filename>.</para>
628 <term><filename>systemd-logger.service</filename></term>
630 <para>This is internally used
631 by systemd to provide syslog
632 logging to the processes it
635 socket-activated service, see
636 <filename>system-logger.socket</filename>.</para>
640 <term><filename>systemd-logger.socket</filename></term>
642 <para>Socket activation unit
644 <filename>system-logger.service</filename>. systemd
645 will automatically add
646 dependencies of types Requires
647 and After to all units that
648 have been configured for
649 stdout or stderr to be
650 connected to syslog or the
651 kernel log buffer.</para>
658 <title>Special Session Units</title>
660 <para>When systemd runs as a service instance, the
661 following special units are available, which have
662 similar definitions as their system counterparts:
663 <filename>default.target</filename>,
664 <filename>local-fs.target</filename>,
665 <filename>remote-fs.target</filename>,
666 <filename>shutdown.target</filename>,
667 <filename>sockets.target</filename>,
668 <filename>swap.target</filename>.</para>
670 <para>In addition the following special unit is
671 understood only when systemd runs as service instance:</para>
675 <term><filename>exit.service</filename></term>
677 <para>A special service unit
678 for shutting down the
681 <para>Applications wanting to
682 terminate the session should
683 start this unit. If systemd
684 receives SIGTERM or SIGINT
685 when running as session daemon
689 <para>Normally, this pulls in
690 <filename>shutdown.target</filename>
691 which in turn should be
692 conflicted by all units that
693 want to be shut down on
701 <title>See Also</title>
703 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
704 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
705 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>
706 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>