]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd.special.xml
relicense to LGPLv2.1 (with exceptions)
[thirdparty/systemd.git] / man / systemd.special.xml
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">
4
5 <!--
6 This file is part of systemd.
7
8 Copyright 2010 Lennart Poettering
9
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.
14
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.
19
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/>.
22 -->
23
24 <refentry id="systemd.special">
25
26 <refentryinfo>
27 <title>systemd.special</title>
28 <productname>systemd</productname>
29
30 <authorgroup>
31 <author>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
36 </author>
37 </authorgroup>
38 </refentryinfo>
39
40 <refmeta>
41 <refentrytitle>systemd.special</refentrytitle>
42 <manvolnum>7</manvolnum>
43 </refmeta>
44
45 <refnamediv>
46 <refname>systemd.special</refname>
47 <refpurpose>Special systemd units</refpurpose>
48 </refnamediv>
49
50 <refsynopsisdiv>
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>
91 </refsynopsisdiv>
92
93 <refsect1>
94 <title>Description</title>
95
96 <para>A few units are treated specially by
97 systemd. They have special internal semantics and
98 cannot be renamed.</para>
99 </refsect1>
100
101 <refsect1>
102 <title>Special System Units</title>
103
104 <variablelist>
105 <varlistentry>
106 <term><filename>basic.target</filename></term>
107 <listitem>
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
120 the general purpose
121 daemons. Most normal daemons
122 should have dependencies of
123 type After and Requires on
124 this unit.</para>
125 </listitem>
126 </varlistentry>
127 <varlistentry>
128 <term><filename>ctrl-alt-del.target</filename></term>
129 <listitem>
130 <para>systemd starts this
131 target whenever
132 Control+Alt+Del is pressed on
133 the console. Usually this
134 should be aliased (symlinked)
135 to
136 <filename>reboot.target</filename>.</para>
137 </listitem>
138 </varlistentry>
139 <varlistentry>
140 <term><filename>dbus.service</filename></term>
141 <listitem>
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
146 and register its
147 service.</para>
148 </listitem>
149 </varlistentry>
150 <varlistentry>
151 <term><filename>dbus.socket</filename></term>
152 <listitem>
153 <para>A special unit for the
154 D-Bus system bus socket. All
155 units with
156 <literal>Type=dbus</literal>
157 automatically gain a
158 dependency on this
159 unit.</para>
160 </listitem>
161 </varlistentry>
162 <varlistentry>
163 <term><filename>default.target</filename></term>
164 <listitem>
165 <para>The default unit systemd
166 starts at bootup. Usually this
167 should be aliased (symlinked)
168 to
169 <filename>multi-user.target</filename>
170 or
171 <filename>graphical.target</filename>.</para>
172 <para>The default unit systemd
173 starts at bootup can be
174 overridden with the
175 <varname>systemd.unit=</varname>
176 kernel command line option.</para>
177 </listitem>
178 </varlistentry>
179 <varlistentry>
180 <term><filename>display-manager.service</filename></term>
181 <listitem>
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
187 service.</para>
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
193 referring to the
194 <literal>$x-display-manager</literal>
195 facility, for compatibility
196 with Debian.</para>
197 </listitem>
198 </varlistentry>
199 <varlistentry>
200 <term><filename>emergency.target</filename></term>
201 <listitem>
202 <para>A special target unit
203 that starts an emergency
204 shell on the main
205 console. This unit is supposed
206 to be used with the kernel
207 command line option
208 <varname>systemd.unit=</varname>
209 and has otherwise little use.
210 </para>
211 </listitem>
212 </varlistentry>
213 <varlistentry>
214 <term><filename>final.target</filename></term>
215 <listitem>
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
222 mounts unmounted.
223 </para>
224 </listitem>
225 </varlistentry>
226 <varlistentry>
227 <term><filename>graphical.target</filename></term>
228 <listitem>
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>
233
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>
240 </listitem>
241 </varlistentry>
242 <varlistentry>
243 <term><filename>http-daemon.target</filename></term>
244 <listitem>
245 <para>A target for pulling in
246 an HTTP server if there is
247 any.</para>
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
253 referring to the
254 <literal>$httpd</literal>
255 facility.</para>
256 </listitem>
257 </varlistentry>
258 <varlistentry>
259 <term><filename>halt.target</filename></term>
260 <listitem>
261 <para>A special target unit
262 for shutting down and halting the system.</para>
263
264 <para>Applications wanting to
265 halt the system should start
266 this unit.</para>
267 </listitem>
268 </varlistentry>
269 <varlistentry>
270 <term><filename>kbrequest.target</filename></term>
271 <listitem>
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>
278 </listitem>
279 </varlistentry>
280 <varlistentry>
281 <term><filename>kexec.target</filename></term>
282 <listitem>
283 <para>A special target unit
284 for shutting down and rebooting the system via kexec.</para>
285
286 <para>Applications wanting to
287 reboot the system with kexec should start
288 this unit.</para>
289 </listitem>
290 </varlistentry>
291 <varlistentry>
292 <term><filename>local-fs.target</filename></term>
293 <listitem>
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
302 mounts listed in
303 <filename>/etc/fstab</filename>
304 that have the
305 <option>auto</option> and
306 <option>comment=systemd.mount</option>
307 mount options set.</para>
308
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
314 referring to the
315 <literal>$local_fs</literal>
316 facility.</para>
317 </listitem>
318 </varlistentry>
319 <varlistentry>
320 <term><filename>local-fs-pre.target</filename></term>
321 <listitem>
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>
329 </listitem>
330 </varlistentry>
331 <varlistentry>
332 <term><filename>mail-transfer-agent.target</filename></term>
333 <listitem>
334 <para>The mail transfer agent
335 (MTA) service. Usually this
336 should pull-in all units
337 necessary for
338 sending/receiving mails on the
339 local host.</para>
340
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
346 referring to the
347 <literal>$mail-transfer-agent</literal>
348 or
349 <literal>$mail-transport-agent</literal>
350 facilities, for compatibility
351 with Debian.</para>
352 </listitem>
353 </varlistentry>
354 <varlistentry>
355 <term><filename>multi-user.target</filename></term>
356 <listitem>
357 <para>A special target unit
358 for setting up a multi-user
359 system (non-graphical). This
360 is pulled in by
361 <filename>graphical.target</filename>.</para>
362
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
367 installation.</para>
368 </listitem>
369 </varlistentry>
370 <varlistentry>
371 <term><filename>network.target</filename></term>
372 <listitem>
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
378 referring to the
379 <literal>$network</literal>
380 facility.</para>
381 </listitem>
382 </varlistentry>
383 <varlistentry>
384 <term><filename>nss-lookup.target</filename></term>
385 <listitem>
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
392 which
393 <filename>nss-user-lookup.target</filename>
394 should be used. systemd
395 automatically adds
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>
401 facility.</para>
402 </listitem>
403 </varlistentry>
404 <varlistentry>
405 <term><filename>nss-user-lookup.target</filename></term>
406 <listitem>
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
413 which
414 <filename>nss-lookup.target</filename>
415 should be used. </para>
416 </listitem>
417 </varlistentry>
418 <varlistentry>
419 <term><filename>poweroff.target</filename></term>
420 <listitem>
421 <para>A special target unit
422 for shutting down and powering off the system.</para>
423
424 <para>Applications wanting to
425 power off the system should start
426 this unit.</para>
427
428 <para><filename>runlevel0.target</filename>
429 is an alias for this target
430 unit, for compatibility with SysV.</para>
431 </listitem>
432 </varlistentry>
433 <varlistentry>
434 <term><filename>reboot.target</filename></term>
435 <listitem>
436 <para>A special target unit
437 for shutting down and rebooting the system.</para>
438
439 <para>Applications wanting to
440 reboot the system should start
441 this unit.</para>
442
443 <para><filename>runlevel6.target</filename>
444 is an alias for this target
445 unit, for compatibility with SysV.</para>
446 </listitem>
447 </varlistentry>
448 <varlistentry>
449 <term><filename>remote-fs.target</filename></term>
450 <listitem>
451 <para>Similar to
452 <filename>local-fs.target</filename>,
453 but for remote mount
454 points.</para>
455
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
461 referring to the
462 <literal>$remote_fs</literal>
463 facility.</para>
464 </listitem>
465 </varlistentry>
466 <varlistentry>
467 <term><filename>remote-fs-pre.target</filename></term>
468 <listitem>
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>
476 </listitem>
477 </varlistentry>
478 <varlistentry>
479 <term><filename>rescue.target</filename></term>
480 <listitem>
481 <para>A special target unit
482 for setting up the base system
483 and a rescue shell.</para>
484
485 <para><filename>runlevel1.target</filename>
486 is an alias for this target
487 unit, for compatibility with SysV.</para>
488 </listitem>
489 </varlistentry>
490 <varlistentry>
491 <term><filename>rpcbind.target</filename></term>
492 <listitem>
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
498 referring to the
499 <literal>$rpcbind</literal>
500 facility.</para>
501 </listitem>
502 </varlistentry>
503 <varlistentry>
504 <term><filename>runlevel2.target</filename></term>
505 <listitem>
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
511 (i.e. symlink to)
512 <filename>multi-user.target</filename>.</para>
513 </listitem>
514 </varlistentry>
515 <varlistentry>
516 <term><filename>runlevel3.target</filename></term>
517 <listitem>
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
523 (i.e. symlink to)
524 <filename>multi-user.target</filename>
525 or
526 <filename>graphical.target</filename>.</para>
527 </listitem>
528 </varlistentry>
529 <varlistentry>
530 <term><filename>runlevel4.target</filename></term>
531 <listitem>
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
537 (i.e. symlink to)
538 <filename>multi-user.target</filename>
539 or
540 <filename>graphical.target</filename>.</para>
541 </listitem>
542 </varlistentry>
543 <varlistentry>
544 <term><filename>runlevel5.target</filename></term>
545 <listitem>
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
551 (i.e. symlink to)
552 <filename>multi-user.target</filename>
553 or
554 <filename>graphical.target</filename>.</para>
555 </listitem>
556 </varlistentry>
557 <varlistentry>
558 <term><filename>shutdown.target</filename></term>
559 <listitem>
560 <para>A special target unit
561 that terminates the services
562 on system shutdown.</para>
563
564 <para>Services that shall be
565 terminated on system shutdown
566 shall add Conflicts
567 dependencies to this unit for
568 their service unit, which is
569 implicitly done when
570 <varname>DefaultDependencies=yes</varname>
571 is set (the default).</para>
572
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
579 or 6.</para>
580 </listitem>
581 </varlistentry>
582 <varlistentry>
583 <term><filename>sigpwr.target</filename></term>
584 <listitem>
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
590 power fails.</para>
591 </listitem>
592 </varlistentry>
593 <varlistentry>
594 <term><filename>sockets.target</filename></term>
595 <listitem>
596 <para>A special target unit
597 that sets up all service
598 sockets.</para>
599
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>
605 </listitem>
606 </varlistentry>
607 <varlistentry>
608 <term><filename>swap.target</filename></term>
609 <listitem>
610 <para>Similar to
611 <filename>local-fs.target</filename>, but for swap
612 partitions and swap
613 files.</para>
614 </listitem>
615 </varlistentry>
616 <varlistentry>
617 <term><filename>sysinit.target</filename></term>
618 <listitem>
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
630 or b.</para>
631 </listitem>
632 </varlistentry>
633 <varlistentry>
634 <term><filename>syslog.service</filename></term>
635 <listitem>
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>
642 </listitem>
643 </varlistentry>
644 <varlistentry>
645 <term><filename>syslog.socket</filename></term>
646 <listitem>
647 <para>The socket unit where
648 syslog implementations should
649 listen on. All userspace log
650 messages will be made
651 available on this
652 socket.</para>
653 </listitem>
654 </varlistentry>
655 <varlistentry>
656 <term><filename>syslog.target</filename></term>
657 <listitem>
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
663 referring to the
664 <literal>$syslog</literal>
665 facility.</para>
666 </listitem>
667 </varlistentry>
668 <varlistentry>
669 <term><filename>time-sync.target</filename></term>
670 <listitem>
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
676 referring to the
677 <literal>$time</literal>
678 facility.</para>
679 </listitem>
680 </varlistentry>
681 <varlistentry>
682 <term><filename>umount.target</filename></term>
683 <listitem>
684 <para>A special target unit
685 that umounts all mount and
686 automount points on system
687 shutdown.</para>
688
689 <para>Mounts that shall be
690 unmounted on system shutdown
691 shall add Conflicts
692 dependencies to this unit for
693 their mount unit, which is
694 implicitly done when
695 <varname>DefaultDependencies=yes</varname>
696 is set (the default).</para>
697 </listitem>
698 </varlistentry>
699 </variablelist>
700 </refsect1>
701
702 <refsect1>
703 <title>Special User Units</title>
704
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>
711
712 <para>In addition the following special unit is
713 understood only when systemd runs as service instance:</para>
714
715 <variablelist>
716 <varlistentry>
717 <term><filename>exit.service</filename></term>
718 <listitem>
719 <para>A special service unit
720 for shutting down the
721 user service manager.</para>
722
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>
730
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>
737 </listitem>
738 </varlistentry>
739 </variablelist>
740 </refsect1>
741
742 <refsect1>
743 <title>See Also</title>
744 <para>
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>
750 </para>
751 </refsect1>
752
753 </refentry>