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>default.target</filename>,
54 <filename>display-manager.service</filename>,
55 <filename>emergency.service</filename>,
56 <filename>exit.service</filename>,
57 <filename>graphical.target</filename>,
58 <filename>halt.target</filename>,
59 <filename>kbrequest.target</filename>,
60 <filename>local-fs.target</filename>,
61 <filename>mail-transfer-agent.target</filename>,
62 <filename>multi-user.target</filename>,
63 <filename>network.target</filename>,
64 <filename>nss-lookup.target</filename>,
65 <filename>poweroff.target</filename>,
66 <filename>reboot.target</filename>,
67 <filename>remote-fs.target</filename>,
68 <filename>rescue.target</filename>,
69 <filename>rpcbind.target</filename>,
70 <filename>rtc-set.target</filename>,
71 <filename>runlevel0.target</filename>,
72 <filename>runlevel1.target</filename>,
73 <filename>runlevel2.target</filename>,
74 <filename>runlevel3.target</filename>,
75 <filename>runlevel4.target</filename>,
76 <filename>runlevel5.target</filename>,
77 <filename>runlevel6.target</filename>
78 <filename>shutdown.target</filename>,
79 <filename>sigpwr.target</filename>,
80 <filename>sockets.target</filename>,
81 <filename>swap.target</filename>,
82 <filename>syslog.target</filename>,
83 <filename>systemd-initctl.service</filename>,
84 <filename>systemd-initctl.socket</filename>,
85 <filename>systemd-logger.service</filename>,
86 <filename>systemd-logger.socket</filename></para>
90 <title>Description</title>
92 <para>A few units are treated specially by
93 systemd. They have special internal semantics and
94 cannot be renamed.</para>
98 <title>Special System Units</title>
102 <term><filename>basic.target</filename></term>
104 <para>A special target unit
105 covering early boot-up.</para>
106 <para>systemd automatically
107 adds dependencies of the types
108 Requires and After for this
109 target unit to all SysV
110 service units configured for
111 runlevel 1 to 5.</para>
112 <para>systemd automatically
113 adds dependencies of the types
114 Wants and After for all
115 SysV service units configured
116 for runlevels that are not 0
117 to 6 to this target unit.
118 This covers the special
119 boot-up runlevels some
120 distributions have, such as S
125 <term><filename>ctrl-alt-del.target</filename></term>
127 <para>systemd starts this
129 Control+Alt+Del is pressed on
130 the console. Usually this
131 should be aliased (symlinked)
133 <filename>reboot.target</filename>.</para>
137 <term><filename>default.target</filename></term>
139 <para>The default unit systemd
140 starts at bootup. Usually this
141 should be aliased (symlinked)
143 <filename>multi-user.target</filename>
145 <filename>graphical.target</filename>.</para>
146 <para>The default unit systemd
147 starts at bootup can be
149 <varname>systemd.default=</varname>
150 kernel command line option.</para>
154 <term><filename>display-manager.service</filename></term>
156 <para>The display manager
157 service. Usually this should
158 be aliased (symlinked) to
159 <filename>gdm.service</filename>
160 or a similar display manager
162 <para>systemd automatically
163 adds dependencies of type
164 After for this target unit to
165 all SysV init script service
166 units with an LSB header
168 <literal>$x-display-manager</literal>
169 facility, for compatibility
174 <term><filename>emergency.service</filename></term>
176 <para>A special service unit
177 that starts an emergency
179 console. This unit is supposed
180 to be used with the kernel
182 <varname>systemd.default=</varname>
183 and has otherwise little use.
188 <term><filename>graphical.target</filename></term>
190 <para>A special target unit
191 for setting up a graphical
192 login screen. This pulls in
193 <filename>multi-user.target</filename>.</para>
195 <para>Units that are needed
196 for graphical login shall add
197 Wants dependencies for their
198 unit to this unit (or
199 <filename>multi-user.target</filename>)
200 during installation.</para>
204 <term><filename>halt.target</filename></term>
206 <para>A special target unit
207 for shutting down and halting the system.</para>
209 <para>Applications wanting to
210 halt the system should start
215 <term><filename>kbrequest.target</filename></term>
217 <para>systemd starts this
218 target whenever Alt+ArrowUp is
219 pressed on the console. This
220 is a good candidate to be
221 aliased (symlinked) to
222 <filename>rescue.target</filename>.</para>
226 <term><filename>local-fs.target</filename></term>
228 <para>systemd automatically
229 adds dependencies of type
230 After to all mount units that
231 refer to local mount points
232 for this target unit. In
233 addition, systemd adds
234 dependencies of type Wants to
235 this target unit for those
237 <filename>/etc/fstab</filename>
239 <literal>auto</literal> and
240 <literal>comment=systemd.mount</literal>
241 mount options set.</para>
243 <para>systemd automatically
244 adds dependencies of type
245 After for this target unit to
246 all SysV init script service
247 units with an LSB header
249 <literal>$local_fs</literal>
254 <term><filename>mail-transfer-agent.target</filename></term>
256 <para>The mail transfer agent
257 (MTA) service. Usually this
258 should pull in all units
260 sending/receiving mails on the
263 <para>systemd automatically
264 adds dependencies of type
265 After for this target unit to
266 all SysV init script service
267 units with an LSB header
269 <literal>$mail-transfer-argent</literal>
271 <literal>$mail-transport-agent</literal>
272 facilities, for compatibility
277 <term><filename>multi-user.target</filename></term>
279 <para>A special target unit
280 for setting up a multi-user
281 system (non-graphical). This
283 <filename>graphical.target</filename>.</para>
285 <para>Units that are needed
286 for a multi-user system shall
287 add Wants dependencies to
288 this unit for their unit during
293 <term><filename>network.target</filename></term>
295 <para>systemd automatically
296 adds dependencies of type
297 After for this target unit to
298 all SysV init script service
299 units with an LSB header
301 <literal>$network</literal>
306 <term><filename>nss-lookup.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>$named</literal>
319 <term><filename>poweroff.target</filename></term>
321 <para>A special target unit
322 for shutting down and powering off the system.</para>
324 <para>Applications wanting to
325 power off the system should start
328 <para><filename>runlevel0.target</filename>
329 is an alias for this target
330 unit, for compatibility with SysV.</para>
334 <term><filename>reboot.target</filename></term>
336 <para>A special target unit
337 for shutting down and rebooting the system.</para>
339 <para>Applications wanting to
340 reboot the system should start
343 <para><filename>runlevel6.target</filename>
344 is an alias for this target
345 unit, for compatibility with SysV.</para>
349 <term><filename>remote-fs.target</filename></term>
352 <filename>local-fs.target</filename>,
356 <para>systemd automatically
357 adds dependencies of type
358 After for this target unit to
359 all SysV init script service
360 units with an LSB header
362 <literal>$remote_fs</literal>
367 <term><filename>rescue.target</filename></term>
369 <para>A special target unit
370 for setting up the base system
371 and a rescue shell.</para>
373 <para><filename>runlevel1.target</filename>
374 is an alias for this target
375 unit, for compatibility with SysV.</para>
379 <term><filename>rpcbind.target</filename></term>
381 <para>systemd automatically
382 adds dependencies of type
383 After for this target unit to
384 all SysV init script service
385 units with an LSB header
387 <literal>$rpcbind</literal>
392 <term><filename>rtc-set.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>$time</literal>
405 <term><filename>runlevel0.target</filename></term>
407 <para>This is a target that is
408 called whever the SysV
409 compatibility code asks for
410 runlevel 0. This is an alias
412 <filename>poweroff.target</filename>,
413 for compatibility with
418 <term><filename>runlevel1.target</filename></term>
420 <para>This is a target that is
421 called whever the SysV
422 compatibility code asks for
423 runlevel 1. This is an alias
425 <filename>rescue.target</filename>,
426 for compatibility with
431 <term><filename>runlevel2.target</filename></term>
433 <para>This is a target that is
434 called whever the SysV
435 compatibility code asks for
436 runlevel 2. It is a good idea
437 to make this an alias for
439 <filename>multi-user.target</filename>.</para>
443 <term><filename>runlevel3.target</filename></term>
445 <para>This is a target that is
446 called whever the SysV
447 compatibility code asks for
448 runlevel 3. It is a good idea
449 to make this an alias for
451 <filename>multi-user.target</filename>
453 <filename>graphical.target</filename>.</para>
457 <term><filename>runlevel4.target</filename></term>
459 <para>This is a target that is
460 called whever the SysV
461 compatibility code asks for
462 runlevel 4. It is a good idea
463 to make this an alias for
465 <filename>multi-user.target</filename>
467 <filename>graphical.target</filename>.</para>
471 <term><filename>runlevel5.target</filename></term>
473 <para>This is a target that is
474 called whever the SysV
475 compatibility code asks for
476 runlevel 5. It is a good idea
477 to make this an alias for
479 <filename>multi-user.target</filename>
481 <filename>graphical.target</filename>.</para>
485 <term><filename>runlevel6.target</filename></term>
487 <para>This is a target that is
488 called whever the SysV
489 compatibility code asks for
490 runlevel 6. This is an alias
492 <filename>reboot.target</filename>,
493 for compatibility with
498 <term><filename>shutdown.target</filename></term>
500 <para>A special target unit
501 that terminates the services
502 on system shutdown.</para>
504 <para>Services that shall be
505 terminated on system shutdown
507 dependencies to this unit for
508 their service unit during
511 <para>systemd automatically
512 adds dependencies of type
513 Conflicts to this target unit
514 for all SysV init script
515 service units that shall be
516 terminated in SysV runlevels 0
521 <term><filename>sigpwr.target</filename></term>
523 <para>A special target that is
524 started when systemd receives
525 the SIGPWR process signal,
526 which is normally sent by the
527 kernel or UPS daemons when
532 <term><filename>sockets.target</filename></term>
534 <para>A special target unit
535 that sets up all service
538 <para>Services that can be
539 socket-activated shall add
540 Wants dependencies to this
541 unit for their socket unit
542 during installation.</para>
546 <term><filename>swap.target</filename></term>
549 <filename>local-fs.target</filename>, but for swap
555 <term><filename>syslog.target</filename></term>
557 <para>systemd automatically
558 adds dependencies of type
559 After for this target unit to
560 all SysV init script service
561 units with an LSB header
563 <literal>$syslog</literal>
566 <para>Administrators should
567 ensure that this target pulls
568 in a service unit with the
570 <filename>@SPECIAL_SYSLOG_SERVICE@</filename>
571 (or a socket unit that
577 <term><filename>systemd-initctl.service</filename></term>
580 compatibility with the SysV
581 /dev/initctl file system FIFO
582 for communication with the
585 socket-activated service, see
586 <filename>system-initctl.socket</filename>.</para>
590 <term><filename>systemd-initctl.socket</filename></term>
592 <para>Socket activation unit
594 <filename>system-initctl.service</filename>.</para>
598 <term><filename>systemd-logger.service</filename></term>
600 <para>This is internally used
601 by systemd to provide syslog
602 logging to the processes it
605 socket-activated service, see
606 <filename>system-logger.socket</filename>.</para>
610 <term><filename>systemd-logger.socket</filename></term>
612 <para>Socket activation unit
614 <filename>system-logger.service</filename>. systemd
615 will automatically add
616 dependencies of types Requires
617 and After to all units that
618 have been configured for
619 stdout or stderr to be
620 connected to syslog or the
621 kernel log buffer.</para>
628 <title>Special Session Units</title>
630 <para>When systemd runs as a service instance, the
631 following special units are available, which have
632 similar definitions as their system counterparts:
633 <filename>default.target</filename>,
634 <filename>local-fs.target</filename>,
635 <filename>remote-fs.target</filename>,
636 <filename>shutdown.target</filename>,
637 <filename>sockets.target</filename>,
638 <filename>swap.target</filename>.</para>
640 <para>In addition the following special unit is
641 understood only when systemd runs as service instance:</para>
645 <term><filename>exit.service</filename></term>
647 <para>A special service unit
648 for shutting down the
651 <para>Applications wanting to
652 terminate the session should
653 start this unit. If systemd
654 receives SIGTERM or SIGINT
655 when running as session daemon
659 <para>Normally, this pulls in
660 <filename>shutdown.target</filename>
661 which in turn should be
662 conflicted by all units that
663 want to be shut down on
671 <title>See Also</title>
673 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
674 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
675 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>
676 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>