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>http-daemon.target</filename>,
62 <filename>halt.target</filename>,
63 <filename>kbrequest.target</filename>,
64 <filename>kexec.target</filename>,
65 <filename>local-fs.target</filename>,
66 <filename>local-fs-pre.target</filename>,
67 <filename>mail-transfer-agent.target</filename>,
68 <filename>multi-user.target</filename>,
69 <filename>network.target</filename>,
70 <filename>nss-lookup.target</filename>,
71 <filename>poweroff.target</filename>,
72 <filename>reboot.target</filename>,
73 <filename>remote-fs.target</filename>,
74 <filename>remote-fs-pre.target</filename>,
75 <filename>rescue.target</filename>,
76 <filename>rpcbind.target</filename>,
77 <filename>runlevel2.target</filename>,
78 <filename>runlevel3.target</filename>,
79 <filename>runlevel4.target</filename>,
80 <filename>runlevel5.target</filename>,
81 <filename>shutdown.target</filename>,
82 <filename>sigpwr.target</filename>,
83 <filename>sockets.target</filename>,
84 <filename>swap.target</filename>,
85 <filename>sysinit.target</filename>,
86 <filename>syslog.service</filename>,
87 <filename>syslog.socket</filename>,
88 <filename>syslog.target</filename>,
89 <filename>time-sync.target</filename>,
90 <filename>umount.target</filename></para>
94 <title>Description</title>
96 <para>A few units are treated specially by
97 systemd. They have special internal semantics and
98 cannot be renamed.</para>
102 <title>Special System Units</title>
106 <term><filename>basic.target</filename></term>
108 <para>A special target unit
109 covering early boot-up.</para>
110 <para>systemd automatically
111 adds dependencies of the types
112 Requires and After for this
113 target unit to all SysV
114 service units configured for
115 runlevel 1 to 5.</para>
116 <para>Usually this should pull-in
117 all sockets, mount points,
118 swap devices and other basic
119 initialization necessary for
121 daemons. Most normal daemons
122 should have dependencies of
123 type After and Requires on
128 <term><filename>ctrl-alt-del.target</filename></term>
130 <para>systemd starts this
132 Control+Alt+Del is pressed on
133 the console. Usually this
134 should be aliased (symlinked)
136 <filename>reboot.target</filename>.</para>
140 <term><filename>dbus.service</filename></term>
142 <para>A special unit for the
143 D-Bus system bus. As soon as
144 this service is fully started
145 up systemd will connect to it
151 <term><filename>dbus.socket</filename></term>
153 <para>A special unit for the
154 D-Bus system bus socket. All
156 <literal>Type=dbus</literal>
163 <term><filename>default.target</filename></term>
165 <para>The default unit systemd
166 starts at bootup. Usually this
167 should be aliased (symlinked)
169 <filename>multi-user.target</filename>
171 <filename>graphical.target</filename>.</para>
172 <para>The default unit systemd
173 starts at bootup can be
175 <varname>systemd.unit=</varname>
176 kernel command line option.</para>
180 <term><filename>display-manager.service</filename></term>
182 <para>The display manager
183 service. Usually this should
184 be aliased (symlinked) to
185 <filename>gdm.service</filename>
186 or a similar display manager
188 <para>systemd automatically
189 adds dependencies of type
190 After for this target unit to
191 all SysV init script service
192 units with a LSB header
194 <literal>$x-display-manager</literal>
195 facility, for compatibility
200 <term><filename>emergency.target</filename></term>
202 <para>A special target unit
203 that starts an emergency
205 console. This unit is supposed
206 to be used with the kernel
208 <varname>systemd.unit=</varname>
209 and has otherwise little use.
214 <term><filename>final.target</filename></term>
216 <para>A special target unit
217 that is used during the
218 shutdown logic and may be used
219 to pull in late services after
220 all normal services are
221 already terminated and all
227 <term><filename>graphical.target</filename></term>
229 <para>A special target unit
230 for setting up a graphical
231 login screen. This pulls in
232 <filename>multi-user.target</filename>.</para>
234 <para>Units that are needed
235 for graphical login shall add
236 Wants dependencies for their
237 unit to this unit (or
238 <filename>multi-user.target</filename>)
239 during installation.</para>
243 <term><filename>http-daemon.target</filename></term>
245 <para>A target for pulling in
246 an HTTP server if there is
248 <para>systemd automatically
249 adds dependencies of type
250 After for this target unit to
251 all SysV init script service
252 units with a LSB header
254 <literal>$httpd</literal>
259 <term><filename>halt.target</filename></term>
261 <para>A special target unit
262 for shutting down and halting the system.</para>
264 <para>Applications wanting to
265 halt the system should start
270 <term><filename>kbrequest.target</filename></term>
272 <para>systemd starts this
273 target whenever Alt+ArrowUp is
274 pressed on the console. This
275 is a good candidate to be
276 aliased (symlinked) to
277 <filename>rescue.target</filename>.</para>
281 <term><filename>kexec.target</filename></term>
283 <para>A special target unit
284 for shutting down and rebooting the system via kexec.</para>
286 <para>Applications wanting to
287 reboot the system with kexec should start
292 <term><filename>local-fs.target</filename></term>
294 <para>systemd automatically
295 adds dependencies of type
296 After to all mount units that
297 refer to local mount points
298 for this target unit. In
299 addition, systemd adds
300 dependencies of type Wants to
301 this target unit for those
303 <filename>/etc/fstab</filename>
305 <option>auto</option> and
306 <option>comment=systemd.mount</option>
307 mount options set.</para>
309 <para>systemd automatically
310 adds dependencies of type
311 After for this target unit to
312 all SysV init script service
313 units with an LSB header
315 <literal>$local_fs</literal>
320 <term><filename>local-fs-pre.target</filename></term>
322 <para>This target unit is
323 automatically ordered before
324 all local mount points marked
325 with <option>auto</option>
326 (see above). It can be used to
327 execute certain units before
328 all local mounts.</para>
332 <term><filename>mail-transfer-agent.target</filename></term>
334 <para>The mail transfer agent
335 (MTA) service. Usually this
336 should pull-in all units
338 sending/receiving mails on the
341 <para>systemd automatically
342 adds dependencies of type
343 After for this target unit to
344 all SysV init script service
345 units with an LSB header
347 <literal>$mail-transfer-agent</literal>
349 <literal>$mail-transport-agent</literal>
350 facilities, for compatibility
355 <term><filename>multi-user.target</filename></term>
357 <para>A special target unit
358 for setting up a multi-user
359 system (non-graphical). This
361 <filename>graphical.target</filename>.</para>
363 <para>Units that are needed
364 for a multi-user system shall
365 add Wants dependencies to
366 this unit for their unit during
371 <term><filename>network.target</filename></term>
373 <para>systemd automatically
374 adds dependencies of type
375 After for this target unit to
376 all SysV init script service
377 units with an LSB header
379 <literal>$network</literal>
384 <term><filename>nss-lookup.target</filename></term>
386 <para>A target that should be
387 used as synchronization point
388 for all host/network name
389 service lookups. Note that
390 this is independent of
391 user/group name lookups for
393 <filename>nss-user-lookup.target</filename>
394 should be used. systemd
396 dependencies of type After for
397 this target unit to all SysV
398 init script service units with
399 an LSB header referring to the
400 <literal>$named</literal>
405 <term><filename>nss-user-lookup.target</filename></term>
407 <para>A target that should be
408 used as synchronization point
409 for all user/group name
410 service lookups. Note that
411 this is independent of
412 host/network name lookups for
414 <filename>nss-lookup.target</filename>
415 should be used. </para>
419 <term><filename>poweroff.target</filename></term>
421 <para>A special target unit
422 for shutting down and powering off the system.</para>
424 <para>Applications wanting to
425 power off the system should start
428 <para><filename>runlevel0.target</filename>
429 is an alias for this target
430 unit, for compatibility with SysV.</para>
434 <term><filename>reboot.target</filename></term>
436 <para>A special target unit
437 for shutting down and rebooting the system.</para>
439 <para>Applications wanting to
440 reboot the system should start
443 <para><filename>runlevel6.target</filename>
444 is an alias for this target
445 unit, for compatibility with SysV.</para>
449 <term><filename>remote-fs.target</filename></term>
452 <filename>local-fs.target</filename>,
456 <para>systemd automatically
457 adds dependencies of type
458 After for this target unit to
459 all SysV init script service
460 units with an LSB header
462 <literal>$remote_fs</literal>
467 <term><filename>remote-fs-pre.target</filename></term>
469 <para>This target unit is
470 automatically ordered before
471 all remote mount points marked
472 with <option>auto</option>
473 (see above). It can be used to
474 execute certain units before
475 all remote mounts.</para>
479 <term><filename>rescue.target</filename></term>
481 <para>A special target unit
482 for setting up the base system
483 and a rescue shell.</para>
485 <para><filename>runlevel1.target</filename>
486 is an alias for this target
487 unit, for compatibility with SysV.</para>
491 <term><filename>rpcbind.target</filename></term>
493 <para>systemd automatically
494 adds dependencies of type
495 After for this target unit to
496 all SysV init script service
497 units with an LSB header
499 <literal>$rpcbind</literal>
504 <term><filename>runlevel2.target</filename></term>
506 <para>This is a target that is
507 called whenever the SysV
508 compatibility code asks for
509 runlevel 2. It is a good idea
510 to make this an alias for
512 <filename>multi-user.target</filename>.</para>
516 <term><filename>runlevel3.target</filename></term>
518 <para>This is a target that is
519 called whenever the SysV
520 compatibility code asks for
521 runlevel 3. It is a good idea
522 to make this an alias for
524 <filename>multi-user.target</filename>
526 <filename>graphical.target</filename>.</para>
530 <term><filename>runlevel4.target</filename></term>
532 <para>This is a target that is
533 called whenever the SysV
534 compatibility code asks for
535 runlevel 4. It is a good idea
536 to make this an alias for
538 <filename>multi-user.target</filename>
540 <filename>graphical.target</filename>.</para>
544 <term><filename>runlevel5.target</filename></term>
546 <para>This is a target that is
547 called whenever the SysV
548 compatibility code asks for
549 runlevel 5. It is a good idea
550 to make this an alias for
552 <filename>multi-user.target</filename>
554 <filename>graphical.target</filename>.</para>
558 <term><filename>shutdown.target</filename></term>
560 <para>A special target unit
561 that terminates the services
562 on system shutdown.</para>
564 <para>Services that shall be
565 terminated on system shutdown
567 dependencies to this unit for
568 their service unit, which is
570 <varname>DefaultDependencies=yes</varname>
571 is set (the default).</para>
573 <para>systemd automatically
574 adds dependencies of type
575 Conflicts to this target unit
576 for all SysV init script
577 service units that shall be
578 terminated in SysV runlevels 0
583 <term><filename>sigpwr.target</filename></term>
585 <para>A special target that is
586 started when systemd receives
587 the SIGPWR process signal,
588 which is normally sent by the
589 kernel or UPS daemons when
594 <term><filename>sockets.target</filename></term>
596 <para>A special target unit
597 that sets up all service
600 <para>Services that can be
601 socket-activated shall add
602 Wants dependencies to this
603 unit for their socket unit
604 during installation.</para>
608 <term><filename>swap.target</filename></term>
611 <filename>local-fs.target</filename>, but for swap
617 <term><filename>sysinit.target</filename></term>
619 <para>A special target unit
620 covering early boot-up scripts.</para>
621 <para>systemd automatically
622 adds dependencies of the types
623 Wants and After for all
624 SysV service units configured
625 for runlevels that are not 0
626 to 6 to this target unit.
627 This covers the special
628 boot-up runlevels some
629 distributions have, such as S
634 <term><filename>syslog.service</filename></term>
636 <para>The syslog service if
637 any. Implementations should
638 create a symlink from the
639 actual syslog implementation
640 to this generic name for
641 activating it.</para>
645 <term><filename>syslog.socket</filename></term>
647 <para>The socket unit where
648 syslog implementations should
649 listen on. All userspace log
650 messages will be made
656 <term><filename>syslog.target</filename></term>
658 <para>systemd automatically
659 adds dependencies of type
660 After for this target unit to
661 all SysV init script service
662 units with an LSB header
664 <literal>$syslog</literal>
669 <term><filename>time-sync.target</filename></term>
671 <para>systemd automatically
672 adds dependencies of type
673 After for this target unit to
674 all SysV init script service
675 units with an LSB header
677 <literal>$time</literal>
682 <term><filename>umount.target</filename></term>
684 <para>A special target unit
685 that umounts all mount and
686 automount points on system
689 <para>Mounts that shall be
690 unmounted on system shutdown
692 dependencies to this unit for
693 their mount unit, which is
695 <varname>DefaultDependencies=yes</varname>
696 is set (the default).</para>
703 <title>Special User Units</title>
705 <para>When systemd runs as a user instance, the
706 following special units are available, which have
707 similar definitions as their system counterparts:
708 <filename>default.target</filename>,
709 <filename>shutdown.target</filename>,
710 <filename>sockets.target</filename></para>
712 <para>In addition the following special unit is
713 understood only when systemd runs as service instance:</para>
717 <term><filename>exit.service</filename></term>
719 <para>A special service unit
720 for shutting down the
721 user service manager.</para>
723 <para>Applications wanting to
724 terminate the user service
725 manager should start this
726 unit. If systemd receives
727 SIGTERM or SIGINT when running
728 as user service daemon it will
729 start this unit.</para>
731 <para>Normally, this pulls in
732 <filename>shutdown.target</filename>
733 which in turn should be
734 conflicted by all units that
735 want to be shut down on
736 user service manager exit.</para>
743 <title>See Also</title>
745 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
746 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
747 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
748 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
749 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>