chiark / gitweb /
man: document .requires/ directories
[elogind.git] / man / systemd.special.xml.in
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 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.
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   General Public License for more details.
19
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/>.
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>default.target</filename>,
55                 <filename>display-manager.service</filename>,
56                 <filename>emergency.target</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>runlevel2.target</filename>,
73                 <filename>runlevel3.target</filename>,
74                 <filename>runlevel4.target</filename>,
75                 <filename>runlevel5.target</filename>,
76                 <filename>shutdown.target</filename>,
77                 <filename>sigpwr.target</filename>,
78                 <filename>sockets.target</filename>,
79                 <filename>swap.target</filename>,
80                 <filename>sysinit.target</filename>,
81                 <filename>@SPECIAL_SYSLOG_SERVICE@</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>,
87                 <filename>umount.target</filename></para>
88         </refsynopsisdiv>
89
90         <refsect1>
91                 <title>Description</title>
92
93                 <para>A few units are treated specially by
94                 systemd. They have special internal semantics and
95                 cannot be renamed.</para>
96         </refsect1>
97
98         <refsect1>
99                 <title>Special System Units</title>
100
101                 <variablelist>
102                         <varlistentry>
103                                 <term><filename>basic.target</filename></term>
104                                 <listitem>
105                                         <para>A special target unit
106                                         covering early boot-up.</para>
107                                         <para>systemd automatically
108                                         adds dependencies of the types
109                                         Requires and After for this
110                                         target unit to all SysV
111                                         service units configured for
112                                         runlevel 1 to 5.</para>
113                                         <para>Usually this should pull-in
114                                         all sockets, mount points,
115                                         swap devices and other basic
116                                         initialization necessary for
117                                         the general purpose
118                                         daemons. Most normal daemons
119                                         should have dependencies of
120                                         type After and Requires on
121                                         this unit.</para>
122                                 </listitem>
123                         </varlistentry>
124                         <varlistentry>
125                                 <term><filename>ctrl-alt-del.target</filename></term>
126                                 <listitem>
127                                         <para>systemd starts this
128                                         target whenever
129                                         Control+Alt+Del is pressed on
130                                         the console. Usually this
131                                         should be aliased (symlinked)
132                                         to
133                                         <filename>reboot.target</filename>.</para>
134                                 </listitem>
135                         </varlistentry>
136                         <varlistentry>
137                                 <term><filename>dbus.service</filename></term>
138                                 <listitem>
139                                         <para>A special unit for the
140                                         D-Bus system bus. As soon as
141                                         this service is fully started
142                                         up systemd will connect to it
143                                         and register its
144                                         service.</para>
145                                 </listitem>
146                         </varlistentry>
147                         <varlistentry>
148                                 <term><filename>default.target</filename></term>
149                                 <listitem>
150                                         <para>The default unit systemd
151                                         starts at bootup. Usually this
152                                         should be aliased (symlinked)
153                                         to
154                                         <filename>multi-user.target</filename>
155                                         or
156                                         <filename>graphical.target</filename>.</para>
157                                         <para>The default unit systemd
158                                         starts at bootup can be
159                                         overriden with the
160                                         <varname>systemd.default=</varname>
161                                         kernel command line option.</para>
162                                 </listitem>
163                         </varlistentry>
164                         <varlistentry>
165                                 <term><filename>display-manager.service</filename></term>
166                                 <listitem>
167                                         <para>The display manager
168                                         service. Usually this should
169                                         be aliased (symlinked) to
170                                         <filename>xdm.service</filename>
171                                         or a similar display manager
172                                         service.</para>
173                                         <para>systemd automatically
174                                         adds dependencies of type
175                                         After for this target unit to
176                                         all SysV init script service
177                                         units with a LSB header
178                                         referring to the
179                                         <literal>$x-display-manager</literal>
180                                         facility, for compatibility
181                                         with Debian.</para>
182                                 </listitem>
183                         </varlistentry>
184                         <varlistentry>
185                                 <term><filename>emergency.target</filename></term>
186                                 <listitem>
187                                         <para>A special target unit
188                                         that starts an emergency
189                                         shell on the main
190                                         console. This unit is supposed
191                                         to be used with the kernel
192                                         command line option
193                                         <varname>systemd.default=</varname>
194                                         and has otherwise little use.
195                                         </para>
196                                 </listitem>
197                         </varlistentry>
198                         <varlistentry>
199                                 <term><filename>graphical.target</filename></term>
200                                 <listitem>
201                                         <para>A special target unit
202                                         for setting up a graphical
203                                         login screen. This pulls in
204                                         <filename>multi-user.target</filename>.</para>
205
206                                         <para>Units that are needed
207                                         for graphical login shall add
208                                         Wants dependencies for their
209                                         unit to this unit (or
210                                         <filename>multi-user.target</filename>)
211                                         during installation.</para>
212                                 </listitem>
213                         </varlistentry>
214                         <varlistentry>
215                                 <term><filename>halt.target</filename></term>
216                                 <listitem>
217                                         <para>A special target unit
218                                         for shutting down and halting the system.</para>
219
220                                         <para>Applications wanting to
221                                         halt the system should start
222                                         this unit.</para>
223                                 </listitem>
224                         </varlistentry>
225                         <varlistentry>
226                                 <term><filename>kbrequest.target</filename></term>
227                                 <listitem>
228                                         <para>systemd starts this
229                                         target whenever Alt+ArrowUp is
230                                         pressed on the console. This
231                                         is a good candidate to be
232                                         aliased (symlinked) to
233                                         <filename>rescue.target</filename>.</para>
234                                 </listitem>
235                         </varlistentry>
236                         <varlistentry>
237                                 <term><filename>local-fs.target</filename></term>
238                                 <listitem>
239                                         <para>systemd automatically
240                                         adds dependencies of type
241                                         After to all mount units that
242                                         refer to local mount points
243                                         for this target unit. In
244                                         addition, systemd adds
245                                         dependencies of type Wants to
246                                         this target unit for those
247                                         mounts listed in
248                                         <filename>/etc/fstab</filename>
249                                         that have the
250                                         <option>auto</option> and
251                                         <option>comment=systemd.mount</option>
252                                         mount options set.</para>
253
254                                         <para>systemd automatically
255                                         adds dependencies of type
256                                         After for this target unit to
257                                         all SysV init script service
258                                         units with an LSB header
259                                         referring to the
260                                         <literal>$local_fs</literal>
261                                         facility.</para>
262                                 </listitem>
263                         </varlistentry>
264                         <varlistentry>
265                                 <term><filename>mail-transfer-agent.target</filename></term>
266                                 <listitem>
267                                         <para>The mail transfer agent
268                                         (MTA) service. Usually this
269                                         should pull-in all units
270                                         necessary for
271                                         sending/receiving mails on the
272                                         local host.</para>
273
274                                         <para>systemd automatically
275                                         adds dependencies of type
276                                         After for this target unit to
277                                         all SysV init script service
278                                         units with an LSB header
279                                         referring to the
280                                         <literal>$mail-transfer-argent</literal>
281                                         or
282                                         <literal>$mail-transport-agent</literal>
283                                         facilities, for compatibility
284                                         with Debian.</para>
285                                 </listitem>
286                         </varlistentry>
287                         <varlistentry>
288                                 <term><filename>multi-user.target</filename></term>
289                                 <listitem>
290                                         <para>A special target unit
291                                         for setting up a multi-user
292                                         system (non-graphical). This
293                                         is pulled in by
294                                         <filename>graphical.target</filename>.</para>
295
296                                         <para>Units that are needed
297                                         for a multi-user system shall
298                                         add Wants dependencies to
299                                         this unit for their unit during
300                                         installation.</para>
301                                 </listitem>
302                         </varlistentry>
303                         <varlistentry>
304                                 <term><filename>network.target</filename></term>
305                                 <listitem>
306                                         <para>systemd automatically
307                                         adds dependencies of type
308                                         After for this target unit to
309                                         all SysV init script service
310                                         units with an LSB header
311                                         referring to the
312                                         <literal>$network</literal>
313                                         facility.</para>
314                                 </listitem>
315                         </varlistentry>
316                         <varlistentry>
317                                 <term><filename>nss-lookup.target</filename></term>
318                                 <listitem>
319                                         <para>systemd automatically
320                                         adds dependencies of type
321                                         After for this target unit to
322                                         all SysV init script service
323                                         units with an LSB header
324                                         referring to the
325                                         <literal>$named</literal>
326                                         facility.</para>
327                                 </listitem>
328                         </varlistentry>
329                         <varlistentry>
330                                 <term><filename>poweroff.target</filename></term>
331                                 <listitem>
332                                         <para>A special target unit
333                                         for shutting down and powering off the system.</para>
334
335                                         <para>Applications wanting to
336                                         power off the system should start
337                                         this unit.</para>
338
339                                         <para><filename>runlevel0.target</filename>
340                                         is an alias for this target
341                                         unit, for compatibility with SysV.</para>
342                                 </listitem>
343                         </varlistentry>
344                         <varlistentry>
345                                 <term><filename>reboot.target</filename></term>
346                                 <listitem>
347                                         <para>A special target unit
348                                         for shutting down and rebooting the system.</para>
349
350                                         <para>Applications wanting to
351                                         reboot the system should start
352                                         this unit.</para>
353
354                                         <para><filename>runlevel6.target</filename>
355                                         is an alias for this target
356                                         unit, for compatibility with SysV.</para>
357                                 </listitem>
358                         </varlistentry>
359                         <varlistentry>
360                                 <term><filename>remote-fs.target</filename></term>
361                                 <listitem>
362                                         <para>Similar to
363                                         <filename>local-fs.target</filename>,
364                                         but for remote mount
365                                         points.</para>
366
367                                         <para>systemd automatically
368                                         adds dependencies of type
369                                         After for this target unit to
370                                         all SysV init script service
371                                         units with an LSB header
372                                         referring to the
373                                         <literal>$remote_fs</literal>
374                                         facility.</para>
375                                 </listitem>
376                         </varlistentry>
377                         <varlistentry>
378                                 <term><filename>rescue.target</filename></term>
379                                 <listitem>
380                                         <para>A special target unit
381                                         for setting up the base system
382                                         and a rescue shell.</para>
383
384                                         <para><filename>runlevel1.target</filename>
385                                         is an alias for this target
386                                         unit, for compatibility with SysV.</para>
387                                 </listitem>
388                         </varlistentry>
389                         <varlistentry>
390                                 <term><filename>rpcbind.target</filename></term>
391                                 <listitem>
392                                         <para>systemd automatically
393                                         adds dependencies of type
394                                         After for this target unit to
395                                         all SysV init script service
396                                         units with an LSB header
397                                         referring to the
398                                         <literal>$rpcbind</literal>
399                                         facility.</para>
400                                 </listitem>
401                         </varlistentry>
402                         <varlistentry>
403                                 <term><filename>rtc-set.target</filename></term>
404                                 <listitem>
405                                         <para>systemd automatically
406                                         adds dependencies of type
407                                         After for this target unit to
408                                         all SysV init script service
409                                         units with an LSB header
410                                         referring to the
411                                         <literal>$time</literal>
412                                         facility.</para>
413                                 </listitem>
414                         </varlistentry>
415                         <varlistentry>
416                                 <term><filename>runlevel2.target</filename></term>
417                                 <listitem>
418                                         <para>This is a target that is
419                                         called whever the SysV
420                                         compatibility code asks for
421                                         runlevel 2. It is a good idea
422                                         to make this an alias for
423                                         (i.e. symlink to)
424                                         <filename>multi-user.target</filename>.</para>
425                                 </listitem>
426                         </varlistentry>
427                         <varlistentry>
428                                 <term><filename>runlevel3.target</filename></term>
429                                 <listitem>
430                                         <para>This is a target that is
431                                         called whever the SysV
432                                         compatibility code asks for
433                                         runlevel 3. It is a good idea
434                                         to make this an alias for
435                                         (i.e. symlink to)
436                                         <filename>multi-user.target</filename>
437                                         or
438                                         <filename>graphical.target</filename>.</para>
439                                 </listitem>
440                         </varlistentry>
441                         <varlistentry>
442                                 <term><filename>runlevel4.target</filename></term>
443                                 <listitem>
444                                         <para>This is a target that is
445                                         called whever the SysV
446                                         compatibility code asks for
447                                         runlevel 4. It is a good idea
448                                         to make this an alias for
449                                         (i.e. symlink to)
450                                         <filename>multi-user.target</filename>
451                                         or
452                                         <filename>graphical.target</filename>.</para>
453                                 </listitem>
454                         </varlistentry>
455                         <varlistentry>
456                                 <term><filename>runlevel5.target</filename></term>
457                                 <listitem>
458                                         <para>This is a target that is
459                                         called whever the SysV
460                                         compatibility code asks for
461                                         runlevel 5. It is a good idea
462                                         to make this an alias for
463                                         (i.e. symlink to)
464                                         <filename>multi-user.target</filename>
465                                         or
466                                         <filename>graphical.target</filename>.</para>
467                                 </listitem>
468                         </varlistentry>
469                         <varlistentry>
470                                 <term><filename>shutdown.target</filename></term>
471                                 <listitem>
472                                         <para>A special target unit
473                                         that terminates the services
474                                         on system shutdown.</para>
475
476                                         <para>Services that shall be
477                                         terminated on system shutdown
478                                         shall add Conflicts
479                                         dependencies to this unit for
480                                         their service unit, which is
481                                         implicitly done when
482                                         <varname>DefaultDependencies=yes</varname>
483                                         is set (the default).</para>
484
485                                         <para>systemd automatically
486                                         adds dependencies of type
487                                         Conflicts to this target unit
488                                         for all SysV init script
489                                         service units that shall be
490                                         terminated in SysV runlevels 0
491                                         or 6.</para>
492                                 </listitem>
493                         </varlistentry>
494                         <varlistentry>
495                                 <term><filename>sigpwr.target</filename></term>
496                                 <listitem>
497                                         <para>A special target that is
498                                         started when systemd receives
499                                         the SIGPWR process signal,
500                                         which is normally sent by the
501                                         kernel or UPS daemons when
502                                         power fails.</para>
503                                 </listitem>
504                         </varlistentry>
505                         <varlistentry>
506                                 <term><filename>sockets.target</filename></term>
507                                 <listitem>
508                                         <para>A special target unit
509                                         that sets up all service
510                                         sockets.</para>
511
512                                         <para>Services that can be
513                                         socket-activated shall add
514                                         Wants dependencies to this
515                                         unit for their socket unit
516                                         during installation.</para>
517                                 </listitem>
518                         </varlistentry>
519                         <varlistentry>
520                                 <term><filename>swap.target</filename></term>
521                                 <listitem>
522                                         <para>Similar to
523                                         <filename>local-fs.target</filename>, but for swap
524                                         partitions and swap
525                                         files.</para>
526                                 </listitem>
527                         </varlistentry>
528                         <varlistentry>
529                                 <term><filename>sysinit.target</filename></term>
530                                 <listitem>
531                                         <para>A special target unit
532                                         covering early boot-up scripts.</para>
533                                         <para>systemd automatically
534                                         adds dependencies of the types
535                                         Wants and After for all
536                                         SysV service units configured
537                                         for runlevels that are not 0
538                                         to 6 to this target unit.
539                                         This covers the special
540                                         boot-up runlevels some
541                                         distributions have, such as S
542                                         or b.</para>
543                                 </listitem>
544                         </varlistentry>
545                         <varlistentry>
546                                 <term><filename>@SPECIAL_SYSLOG_SERVICE@</filename></term>
547                                 <listitem>
548                                         <para>A special unit for the
549                                         syslog daemon. As soon as
550                                         this service is fully started
551                                         up systemd will connect to it
552                                         and use it for logging if it
553                                         has been configured for
554                                         that.</para>
555
556                                         <para>Units should generally
557                                         avoid depending on this unit
558                                         directly and instead refer to
559                                         the
560                                         <filename>syslog.target</filename>
561                                         unit instead, which pulls this
562                                         one in directly or indirectly
563                                         via socket-based activation.</para>
564                                 </listitem>
565                         </varlistentry>
566                         <varlistentry>
567                                 <term><filename>syslog.target</filename></term>
568                                 <listitem>
569                                         <para>systemd automatically
570                                         adds dependencies of type
571                                         After for this target unit to
572                                         all SysV init script service
573                                         units with an LSB header
574                                         referring to the
575                                         <literal>$syslog</literal>
576                                         facility.</para>
577
578                                         <para>Administrators should
579                                         ensure that this target pulls
580                                         in a service unit with the
581                                         name or alias of
582                                         <filename>@SPECIAL_SYSLOG_SERVICE@</filename>
583                                         (or a socket unit that
584                                         activates this
585                                         service).</para>
586                                 </listitem>
587                         </varlistentry>
588                         <varlistentry>
589                                 <term><filename>systemd-initctl.service</filename></term>
590                                 <listitem>
591                                         <para>This provides
592                                         compatibility with the SysV
593                                         /dev/initctl file system FIFO
594                                         for communication with the
595                                         init system.</para>
596                                         <para>This is a
597                                         socket-activated service, see
598                                         <filename>system-initctl.socket</filename>.</para>
599                                 </listitem>
600                         </varlistentry>
601                         <varlistentry>
602                                 <term><filename>systemd-initctl.socket</filename></term>
603                                 <listitem>
604                                         <para>Socket activation unit
605                                         for
606                                         <filename>system-initctl.service</filename>.</para>
607                                 </listitem>
608                         </varlistentry>
609                         <varlistentry>
610                                 <term><filename>systemd-logger.service</filename></term>
611                                 <listitem>
612                                         <para>This is internally used
613                                         by systemd to provide syslog
614                                         logging to the processes it
615                                         maintains.</para>
616                                         <para>This is a
617                                         socket-activated service, see
618                                         <filename>system-logger.socket</filename>.</para>
619                                 </listitem>
620                         </varlistentry>
621                         <varlistentry>
622                                 <term><filename>systemd-logger.socket</filename></term>
623                                 <listitem>
624                                         <para>Socket activation unit
625                                         for
626                                         <filename>system-logger.service</filename>. systemd
627                                         will automatically add
628                                         dependencies of types Requires
629                                         and After to all units that
630                                         have been configured for
631                                         stdout or stderr to be
632                                         connected to syslog or the
633                                         kernel log buffer.</para>
634                                 </listitem>
635                         </varlistentry>
636                          <varlistentry>
637                                 <term><filename>systemd-shutdownd.service</filename></term>
638                                 <listitem>
639                                         <para>This is internally used
640                                         by
641                                         <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>
642                                         to implement delayed shutdowns.</para>
643                                         <para>This is a
644                                         socket-activated service, see
645                                         <filename>system-shutdownd.socket</filename>.</para>
646                                 </listitem>
647                         </varlistentry>
648                         <varlistentry>
649                                 <term><filename>systemd-shutdownd.socket</filename></term>
650                                 <listitem>
651                                         <para>Socket activation unit
652                                         for
653                                         <filename>system-shutdownd.service</filename>.</para>
654                                 </listitem>
655                         </varlistentry>
656                         <varlistentry>
657                                 <term><filename>umount.target</filename></term>
658                                 <listitem>
659                                         <para>A special target unit
660                                         that umounts all mount and
661                                         automount points on system
662                                         shutdown.</para>
663
664                                         <para>Mounts that shall be
665                                         unmounted on system shutdown
666                                         shall add Conflicts
667                                         dependencies to this unit for
668                                         their mount unit, which is
669                                         implicitly done when
670                                         <varname>DefaultDependencies=yes</varname>
671                                         is set (the default).</para>
672                                 </listitem>
673                         </varlistentry>
674                 </variablelist>
675         </refsect1>
676
677         <refsect1>
678                 <title>Special User Units</title>
679
680                 <para>When systemd runs as a user instance, the
681                 following special units are available, which have
682                 similar definitions as their system counterparts:
683                 <filename>default.target</filename>,
684                 <filename>local-fs.target</filename>,
685                 <filename>remote-fs.target</filename>,
686                 <filename>shutdown.target</filename>,
687                 <filename>sockets.target</filename>,
688                 <filename>swap.target</filename>.</para>
689
690                 <para>In addition the following special unit is
691                 understood only when systemd runs as service instance:</para>
692
693                 <variablelist>
694                         <varlistentry>
695                                 <term><filename>exit.service</filename></term>
696                                 <listitem>
697                                         <para>A special service unit
698                                         for shutting down the
699                                         user service manager.</para>
700
701                                         <para>Applications wanting to
702                                         terminate the user service
703                                         manager should start this
704                                         unit. If systemd receives
705                                         SIGTERM or SIGINT when running
706                                         as user service daemon it will
707                                         start this unit.</para>
708
709                                         <para>Normally, this pulls in
710                                         <filename>shutdown.target</filename>
711                                         which in turn should be
712                                         conflicted by all units that
713                                         want to be shut down on
714                                         user service manager exit.</para>
715                                 </listitem>
716                         </varlistentry>
717                 </variablelist>
718         </refsect1>
719
720         <refsect1>
721                   <title>See Also</title>
722                   <para>
723                           <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
724                           <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
725                           <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
726                           <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>
727                   </para>
728         </refsect1>
729
730 </refentry>