chiark / gitweb /
doc: grammatical corrections
[elogind.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>bluetooth.target</filename>,
53                 <filename>ctrl-alt-del.target</filename>,
54                 <filename>cryptsetup.target</filename>,
55                 <filename>cryptsetup-pre.target</filename>,
56                 <filename>dbus.service</filename>,
57                 <filename>dbus.socket</filename>,
58                 <filename>default.target</filename>,
59                 <filename>display-manager.service</filename>,
60                 <filename>emergency.target</filename>,
61                 <filename>exit.target</filename>,
62                 <filename>final.target</filename>,
63                 <filename>getty.target</filename>,
64                 <filename>graphical.target</filename>,
65                 <filename>halt.target</filename>,
66                 <filename>hibernate.target</filename>,
67                 <filename>hybrid-sleep.target</filename>,
68                 <filename>initrd-fs.target</filename>,
69                 <filename>kbrequest.target</filename>,
70                 <filename>kexec.target</filename>,
71                 <filename>local-fs.target</filename>,
72                 <filename>local-fs-pre.target</filename>,
73                 <filename>multi-user.target</filename>,
74                 <filename>network.target</filename>,
75                 <filename>network-online.target</filename>,
76                 <filename>network-pre.target</filename>,
77                 <filename>nss-lookup.target</filename>,
78                 <filename>nss-user-lookup.target</filename>,
79                 <filename>paths.target</filename>,
80                 <filename>poweroff.target</filename>,
81                 <filename>printer.target</filename>,
82                 <filename>reboot.target</filename>,
83                 <filename>remote-fs.target</filename>,
84                 <filename>remote-fs-pre.target</filename>,
85                 <filename>rescue.target</filename>,
86                 <filename>initrd-root-fs.target</filename>,
87                 <filename>rpcbind.target</filename>,
88                 <filename>runlevel2.target</filename>,
89                 <filename>runlevel3.target</filename>,
90                 <filename>runlevel4.target</filename>,
91                 <filename>runlevel5.target</filename>,
92                 <filename>shutdown.target</filename>,
93                 <filename>sigpwr.target</filename>,
94                 <filename>sleep.target</filename>,
95                 <filename>smartcard.target</filename>,
96                 <filename>sockets.target</filename>,
97                 <filename>sound.target</filename>,
98                 <filename>suspend.target</filename>,
99                 <filename>swap.target</filename>,
100                 <filename>sysinit.target</filename>,
101                 <filename>syslog.socket</filename>,
102                 <filename>system-update.target</filename>,
103                 <filename>time-sync.target</filename>,
104                 <filename>timers.target</filename>,
105                 <filename>umount.target</filename>,
106                 <filename>-.slice</filename>,
107                 <filename>system.slice</filename>,
108                 <filename>user.slice</filename>,
109                 <filename>machine.slice</filename></para>
110         </refsynopsisdiv>
111
112         <refsect1>
113                 <title>Description</title>
114
115                 <para>A few units are treated specially by
116                 systemd. They have special internal semantics and
117                 cannot be renamed.</para>
118         </refsect1>
119
120         <refsect1>
121                 <title>Special System Units</title>
122
123                 <variablelist>
124                         <varlistentry>
125                                 <term><filename>basic.target</filename></term>
126                                 <listitem>
127                                         <para>A special target unit
128                                         covering basic boot-up.</para>
129                                         <para>systemd automatically
130                                         adds dependencies of the types
131                                         <varname>Requires=</varname>
132                                         and <varname>After=</varname>
133                                         for this target unit to all
134                                         services (except for those
135                                         with
136                                         <varname>DefaultDependencies=no</varname>).</para>
137
138                                         <para>Usually this should
139                                         pull-in all mount points, swap
140                                         devices, sockets, timers, and
141                                         path units and other basic
142                                         initialization necessary for
143                                         general purpose
144                                         daemons.</para>
145                                 </listitem>
146                         </varlistentry>
147                         <varlistentry>
148                                 <term><filename>ctrl-alt-del.target</filename></term>
149                                 <listitem>
150                                         <para>systemd starts this
151                                         target whenever
152                                         Control+Alt+Del is pressed on
153                                         the console. Usually this
154                                         should be aliased (symlinked)
155                                         to
156                                         <filename>reboot.target</filename>.</para>
157                                 </listitem>
158                         </varlistentry>
159                         <varlistentry>
160                                 <term><filename>cryptsetup.target</filename></term>
161                                 <listitem>
162                                         <para>A target that pulls in
163                                         setup services for all
164                                         encrypted block
165                                         devices.</para>
166                                 </listitem>
167                         </varlistentry>
168                         <varlistentry>
169                                 <term><filename>dbus.service</filename></term>
170                                 <listitem>
171                                         <para>A special unit for the
172                                         D-Bus bus daemon. As soon as
173                                         this service is fully started
174                                         up systemd will connect to it
175                                         and register its
176                                         service.</para>
177                                 </listitem>
178                         </varlistentry>
179                         <varlistentry>
180                                 <term><filename>dbus.socket</filename></term>
181                                 <listitem>
182                                         <para>A special unit for the
183                                         D-Bus system bus socket. All
184                                         units with
185                                         <varname>Type=dbus</varname>
186                                         automatically gain a
187                                         dependency on this
188                                         unit.</para>
189                                 </listitem>
190                         </varlistentry>
191                         <varlistentry>
192                                 <term><filename>default.target</filename></term>
193                                 <listitem>
194                                         <para>The default unit systemd
195                                         starts at bootup. Usually this
196                                         should be aliased (symlinked)
197                                         to
198                                         <filename>multi-user.target</filename>
199                                         or
200                                         <filename>graphical.target</filename>.</para>
201
202                                         <para>The default unit systemd
203                                         starts at bootup can be
204                                         overridden with the
205                                         <varname>systemd.unit=</varname>
206                                         kernel command line option.</para>
207                                 </listitem>
208                         </varlistentry>
209                         <varlistentry>
210                                 <term><filename>display-manager.service</filename></term>
211                                 <listitem>
212                                         <para>The display manager
213                                         service. Usually this should
214                                         be aliased (symlinked) to
215                                         <filename>gdm.service</filename>
216                                         or a similar display manager
217                                         service.</para>
218                                 </listitem>
219                         </varlistentry>
220                         <varlistentry>
221                                 <term><filename>emergency.target</filename></term>
222                                 <listitem>
223                                         <para>A special target unit
224                                         that starts an emergency
225                                         shell on the main
226                                         console. This unit is supposed
227                                         to be used with the kernel
228                                         command line option
229                                         <varname>systemd.unit=</varname>
230                                         and has otherwise little use.
231                                         </para>
232                                 </listitem>
233                         </varlistentry>
234                         <varlistentry>
235                                 <term><filename>final.target</filename></term>
236                                 <listitem>
237                                         <para>A special target unit
238                                         that is used during the
239                                         shutdown logic and may be used
240                                         to pull in late services after
241                                         all normal services are
242                                         already terminated and all
243                                         mounts unmounted.
244                                         </para>
245                                 </listitem>
246                         </varlistentry>
247                         <varlistentry>
248                                 <term><filename>getty.target</filename></term>
249                                 <listitem>
250                                         <para>A special target unit
251                                         that pulls in statically
252                                         configured local TTY
253                                         <filename>getty</filename>
254                                         instances.
255                                         </para>
256                                 </listitem>
257                         </varlistentry>
258                         <varlistentry>
259                                 <term><filename>graphical.target</filename></term>
260                                 <listitem>
261                                         <para>A special target unit
262                                         for setting up a graphical
263                                         login screen. This pulls in
264                                         <filename>multi-user.target</filename>.</para>
265
266                                         <para>Units that are needed
267                                         for graphical logins shall add
268                                         <varname>Wants=</varname>
269                                         dependencies for their unit to
270                                         this unit (or
271                                         <filename>multi-user.target</filename>)
272                                         during installation. This is
273                                         best configured via
274                                         <varname>WantedBy=graphical.target</varname>
275                                         in the unit's
276                                         <literal>[Install]</literal>
277                                         section.</para>
278                                 </listitem>
279                         </varlistentry>
280                         <varlistentry>
281                                 <term><filename>hibernate.target</filename></term>
282                                 <listitem>
283                                         <para>A special target unit
284                                         for hibernating the
285                                         system. This pulls in
286                                         <filename>sleep.target</filename>.</para>
287                                 </listitem>
288                         </varlistentry>
289                         <varlistentry>
290                                 <term><filename>hybrid-sleep.target</filename></term>
291                                 <listitem>
292                                         <para>A special target unit
293                                         for hibernating and suspending the
294                                         system at the same time. This pulls in
295                                         <filename>sleep.target</filename>.</para>
296                                 </listitem>
297                         </varlistentry>
298                         <varlistentry>
299                                 <term><filename>halt.target</filename></term>
300                                 <listitem>
301                                         <para>A special target unit
302                                         for shutting down and halting
303                                         the system. Note that this
304                                         target is distinct from
305                                         <filename>poweroff.target</filename>
306                                         in that it generally really
307                                         just halts the system rather
308                                         than powering it down.</para>
309
310                                         <para>Applications wanting to
311                                         halt the system should start
312                                         this unit.</para>
313                                 </listitem>
314                         </varlistentry>
315                         <varlistentry>
316                                 <term><filename>initrd-fs.target</filename></term>
317                                 <listitem>
318                                         <para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
319                                         automatically adds
320                                         dependencies of type
321                                         <varname>Before=</varname> to
322                                         <filename>sysroot-usr.mount</filename>
323                                         and all mount points found in
324                                         <filename>/etc/fstab</filename>
325                                         that have the
326                                         <option>auto</option> and
327                                         <option>x-initrd.mount</option>
328                                         mount options set.
329                                         </para>
330                                 </listitem>
331                         </varlistentry>
332                         <varlistentry>
333                                 <term><filename>kbrequest.target</filename></term>
334                                 <listitem>
335                                         <para>systemd starts this
336                                         target whenever Alt+ArrowUp is
337                                         pressed on the console. This
338                                         is a good candidate to be
339                                         aliased (symlinked) to
340                                         <filename>rescue.target</filename>.</para>
341                                 </listitem>
342                         </varlistentry>
343                         <varlistentry>
344                                 <term><filename>kexec.target</filename></term>
345                                 <listitem>
346                                         <para>A special target unit
347                                         for shutting down and rebooting the system via kexec.</para>
348
349                                         <para>Applications wanting to
350                                         reboot the system with kexec should start
351                                         this unit.</para>
352                                 </listitem>
353                         </varlistentry>
354                         <varlistentry>
355                                 <term><filename>local-fs.target</filename></term>
356                                 <listitem>
357                                         <para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
358                                         automatically adds
359                                         dependencies of type
360                                         <varname>Before=</varname> to
361                                         all mount units that refer to
362                                         local mount points for this
363                                         target unit. In addition, it
364                                         adds dependencies of type
365                                         <varname>Wants=</varname> to
366                                         this target unit for those
367                                         mounts listed in
368                                         <filename>/etc/fstab</filename>
369                                         that have the
370                                         <option>auto</option> mount
371                                         option set.</para>
372                                 </listitem>
373                         </varlistentry>
374                         <varlistentry>
375                                 <term><filename>multi-user.target</filename></term>
376                                 <listitem>
377                                         <para>A special target unit
378                                         for setting up a multi-user
379                                         system (non-graphical). This
380                                         is pulled in by
381                                         <filename>graphical.target</filename>.</para>
382
383                                         <para>Units that are needed
384                                         for a multi-user system shall
385                                         add <varname>Wants=</varname>
386                                         dependencies for their unit to
387                                         this unit during
388                                         installation. This is best
389                                         configured via
390                                         <varname>WantedBy=multi-user.target</varname>
391                                         in the unit's
392                                         <literal>[Install]</literal>
393                                         section.</para>
394                                 </listitem>
395                         </varlistentry>
396                         <varlistentry>
397                                 <term><filename>network-online.target</filename></term>
398                                 <listitem>
399                                         <para>Units that strictly
400                                         require a configured network
401                                         connection should pull in
402                                         <filename>network-online.target</filename>
403                                         (via a
404                                         <varname>Wants=</varname> type
405                                         dependency) and order
406                                         themselves after it. This
407                                         target unit is intended to
408                                         pull in a service that delays
409                                         further execution until the
410                                         network is sufficiently set
411                                         up. What precisely this
412                                         requires is left to the
413                                         implementation of the network
414                                         managing service.</para>
415
416                                         <para>Note the distinction
417                                         between this unit and
418                                         <filename>network.target</filename>. This
419                                         unit is an active unit
420                                         (i.e. pulled in by the
421                                         consumer rather than the
422                                         provider of this
423                                         functionality) and pulls in a
424                                         service which possibly adds
425                                         substantial delays to further
426                                         execution. In contrast,
427                                         <filename>network.target</filename>
428                                         is a passive unit (i.e. pulled
429                                         in by the provider of the
430                                         functionality, rather than the
431                                         consumer) that usually does
432                                         not delay execution
433                                         much. Usually,
434                                         <filename>network.target</filename>
435                                         is part of the boot of most
436                                         systems, while
437                                         <filename>network-online.target</filename>
438                                         is not, except when at least
439                                         one unit requires it. Also see
440                                         <ulink
441                                         url="http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget">Running
442                                         Services After the Network is
443                                         up</ulink> for more
444                                         information.</para>
445
446                                         <para>All mount units for
447                                         remote network file systems
448                                         automatically pull in this
449                                         unit, and order themselves
450                                         after it. Note that networking
451                                         daemons that simply provide
452                                         functionality to other hosts
453                                         generally do not need to pull
454                                         this in.</para>
455                                         </listitem>
456                         </varlistentry>
457                         <varlistentry>
458                                 <term><filename>paths.target</filename></term>
459                                 <listitem>
460                                         <para>A special target unit
461                                         that sets up all path units
462                                         (see
463                                         <citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry>
464                                         for details) that shall be
465                                         active after boot.</para>
466
467                                         <para>It is recommended that
468                                         path units installed by
469                                         applications get pulled in via
470                                         <varname>Wants=</varname>
471                                         dependencies from this
472                                         unit. This is best configured
473                                         via a
474                                         <varname>WantedBy=paths.target</varname>
475                                         in the path unit's
476                                         <literal>[Install]</literal>
477                                         section.</para>
478                                 </listitem>
479                         </varlistentry>
480                         <varlistentry>
481                                 <term><filename>poweroff.target</filename></term>
482                                 <listitem>
483                                         <para>A special target unit
484                                         for shutting down and powering off the system.</para>
485
486                                         <para>Applications wanting to
487                                         power off the system should start
488                                         this unit.</para>
489
490                                         <para><filename>runlevel0.target</filename>
491                                         is an alias for this target
492                                         unit, for compatibility with SysV.</para>
493                                 </listitem>
494                         </varlistentry>
495                         <varlistentry>
496                                 <term><filename>reboot.target</filename></term>
497                                 <listitem>
498                                         <para>A special target unit
499                                         for shutting down and rebooting the system.</para>
500
501                                         <para>Applications wanting to
502                                         reboot the system should start
503                                         this unit.</para>
504
505                                         <para><filename>runlevel6.target</filename>
506                                         is an alias for this target
507                                         unit, for compatibility with SysV.</para>
508                                 </listitem>
509                         </varlistentry>
510                         <varlistentry>
511                                 <term><filename>remote-fs.target</filename></term>
512                                 <listitem>
513                                         <para>Similar to
514                                         <filename>local-fs.target</filename>,
515                                         but for remote mount
516                                         points.</para>
517
518                                         <para>systemd automatically
519                                         adds dependencies of type
520                                         <varname>After=</varname> for
521                                         this target unit to all SysV
522                                         init script service units with
523                                         an LSB header referring to the
524                                         <literal>$remote_fs</literal>
525                                         facility.</para>
526                                 </listitem>
527                         </varlistentry>
528                         <varlistentry>
529                                 <term><filename>rescue.target</filename></term>
530                                 <listitem>
531                                         <para>A special target unit
532                                         for setting up the base system
533                                         and a rescue shell.</para>
534
535                                         <para><filename>runlevel1.target</filename>
536                                         is an alias for this target
537                                         unit, for compatibility with SysV.</para>
538                                 </listitem>
539                         </varlistentry>
540                         <varlistentry>
541                                 <term><filename>initrd-root-fs.target</filename></term>
542                                 <listitem>
543                                         <para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
544                                         automatically adds
545                                         dependencies of type
546                                         <varname>Before=</varname> to
547                                         the
548                                         <filename>sysroot.mount</filename>
549                                         unit, which is generated from
550                                         the kernel command line.
551                                         </para>
552                                 </listitem>
553                         </varlistentry>
554                         <varlistentry>
555                                 <term><filename>runlevel2.target</filename></term>
556                                 <term><filename>runlevel3.target</filename></term>
557                                 <term><filename>runlevel4.target</filename></term>
558                                 <term><filename>runlevel5.target</filename></term>
559                                 <listitem>
560                                         <para>These are targets that
561                                         are called whenever the SysV
562                                         compatibility code asks for
563                                         runlevel 2, 3, 4, 5,
564                                         respectively. It is a good
565                                         idea to make this an alias for
566                                         (i.e. symlink to)
567                                         <filename>multi-user.target</filename>
568                                         (for runlevel 2) or
569                                         <filename>graphical.target</filename>
570                                         (the others).</para>
571                                 </listitem>
572                         </varlistentry>
573                         <varlistentry>
574                                 <term><filename>shutdown.target</filename></term>
575                                 <listitem>
576                                         <para>A special target unit
577                                         that terminates the services
578                                         on system shutdown.</para>
579
580                                         <para>Services that shall be
581                                         terminated on system shutdown
582                                         shall add <varname>Conflicts=</varname>
583                                         dependencies to this unit for
584                                         their service unit, which is
585                                         implicitly done when
586                                         <varname>DefaultDependencies=yes</varname>
587                                         is set (the default).</para>
588                                 </listitem>
589                         </varlistentry>
590                         <varlistentry>
591                                 <term><filename>sigpwr.target</filename></term>
592                                 <listitem>
593                                         <para>A special target that is
594                                         started when systemd receives
595                                         the SIGPWR process signal,
596                                         which is normally sent by the
597                                         kernel or UPS daemons when
598                                         power fails.</para>
599                                 </listitem>
600                         </varlistentry>
601                         <varlistentry>
602                                 <term><filename>sleep.target</filename></term>
603                                 <listitem>
604                                         <para>A special target unit
605                                         that is pulled in by
606                                         <filename>suspend.target</filename>,
607                                         <filename>hibernate.target</filename>
608                                         and
609                                         <filename>hybrid-sleep.target</filename>
610                                         and may be used to hook units
611                                         into the sleep state
612                                         logic.</para>
613                                 </listitem>
614                         </varlistentry>
615                         <varlistentry>
616                                 <term><filename>sockets.target</filename></term>
617                                 <listitem>
618                                         <para>A special target unit
619                                         that sets up all socket
620                                         units.(see
621                                         <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>
622                                         for details) that shall be
623                                         active after boot.</para>
624
625                                         <para>Services that can be
626                                         socket-activated shall add
627                                         <varname>Wants=</varname>
628                                         dependencies to this unit for
629                                         their socket unit during
630                                         installation. This is best
631                                         configured via a
632                                         <varname>WantedBy=sockets.target</varname>
633                                         in the socket unit's
634                                         <literal>[Install]</literal>
635                                         section.</para>
636                                 </listitem>
637                         </varlistentry>
638                         <varlistentry>
639                                 <term><filename>suspend.target</filename></term>
640                                 <listitem>
641                                         <para>A special target unit
642                                         for suspending the
643                                         system. This pulls in
644                                         <filename>sleep.target</filename>.</para>
645                                 </listitem>
646                         </varlistentry>
647                         <varlistentry>
648                                 <term><filename>swap.target</filename></term>
649                                 <listitem>
650                                         <para>Similar to
651                                         <filename>local-fs.target</filename>, but for swap
652                                         partitions and swap
653                                         files.</para>
654                                 </listitem>
655                         </varlistentry>
656                         <varlistentry>
657                                 <term><filename>sysinit.target</filename></term>
658                                 <listitem>
659                                         <para>A special target unit
660                                         covering early boot-up scripts.</para>
661                                 </listitem>
662                         </varlistentry>
663                         <varlistentry>
664                                 <term><filename>syslog.socket</filename></term>
665                                 <listitem>
666                                         <para>The socket unit
667                                         syslog implementations should
668                                         listen on. All userspace log
669                                         messages will be made
670                                         available on this socket. For
671                                         more information about syslog
672                                         integration, please consult
673                                         the <ulink
674                                         url="http://www.freedesktop.org/wiki/Software/systemd/syslog">Syslog
675                                         Interface</ulink>
676                                         document.</para>
677                                 </listitem>
678                         </varlistentry>
679                         <varlistentry>
680                                 <term><filename>system-update.target</filename></term>
681                                 <listitem>
682                                         <para>A special target unit
683                                         that is used for off-line
684                                         system updates.
685                                         <citerefentry><refentrytitle>systemd-system-update-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
686                                         will redirect the boot process
687                                         to this target if
688                                         <filename>/system-update</filename>
689                                         exists. For more information
690                                         see the <ulink
691                                         url="http://freedesktop.org/wiki/Software/systemd/SystemUpdates">System
692                                         Updates
693                                         Specification</ulink>.</para>
694                                 </listitem>
695                         </varlistentry>
696                         <varlistentry>
697                                 <term><filename>timers.target</filename></term>
698                                 <listitem>
699                                         <para>A special target unit
700                                         that sets up all timer
701                                         units (see
702                                         <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>
703                                         for details) that shall be
704                                         active after boot.</para>
705
706                                         <para>It is recommended that
707                                         timer units installed by
708                                         applications get pulled in via
709                                         <varname>Wants=</varname>
710                                         dependencies from this
711                                         unit. This is best configured
712                                         via
713                                         <varname>WantedBy=timers.target</varname>
714                                         in the timer unit's
715                                         <literal>[Install]</literal>
716                                         section.</para>
717                                 </listitem>
718                         </varlistentry>
719                         <varlistentry>
720                                 <term><filename>umount.target</filename></term>
721                                 <listitem>
722                                         <para>A special target unit
723                                         that umounts all mount and
724                                         automount points on system
725                                         shutdown.</para>
726
727                                         <para>Mounts that shall be
728                                         unmounted on system shutdown
729                                         shall add Conflicts
730                                         dependencies to this unit for
731                                         their mount unit, which is
732                                         implicitly done when
733                                         <varname>DefaultDependencies=yes</varname>
734                                         is set (the default).</para>
735                                 </listitem>
736                         </varlistentry>
737
738                 </variablelist>
739         </refsect1>
740
741         <refsect1>
742                 <title>Special System Units for Devices</title>
743
744                 <para>Some target units are automatically pulled in as
745                 devices of certain kinds show up in the system. These
746                 may be used to automatically activate various services
747                 based on the specific type of the available
748                 hardware.</para>
749
750                 <variablelist>
751                         <varlistentry>
752                                 <term><filename>bluetooth.target</filename></term>
753                                 <listitem>
754                                         <para>This target is started
755                                         automatically as soon as a
756                                         Bluetooth controller is
757                                         plugged in or becomes
758                                         available at boot.</para>
759
760                                         <para>This may be used to pull
761                                         in Bluetooth management
762                                         daemons dynamically when
763                                         Bluetooth hardware is
764                                         found.</para>
765                                 </listitem>
766                         </varlistentry>
767                         <varlistentry>
768                                 <term><filename>printer.target</filename></term>
769                                 <listitem>
770                                         <para>This target is started
771                                         automatically as soon as a
772                                         printer is plugged in or
773                                         becomes available at
774                                         boot.</para>
775
776                                         <para>This may be used to pull
777                                         in printer management
778                                         daemons dynamically when
779                                         printer hardware is
780                                         found.</para>
781                                 </listitem>
782                         </varlistentry>
783                         <varlistentry>
784                                 <term><filename>smartcard.target</filename></term>
785                                 <listitem>
786                                         <para>This target is started
787                                         automatically as soon as a
788                                         smartcard controller is
789                                         plugged in or becomes
790                                         available at boot.</para>
791
792                                         <para>This may be used to pull
793                                         in smartcard management
794                                         daemons dynamically when
795                                         smartcard hardware is
796                                         found.</para>
797                                 </listitem>
798                         </varlistentry>
799                         <varlistentry>
800                                 <term><filename>sound.target</filename></term>
801                                 <listitem>
802                                         <para>This target is started
803                                         automatically as soon as a
804                                         sound card is plugged in or
805                                         becomes available at
806                                         boot.</para>
807
808                                         <para>This may be used to pull
809                                         in audio management daemons
810                                         dynamically when audio
811                                         hardware is found.</para>
812                                 </listitem>
813                         </varlistentry>
814                 </variablelist>
815         </refsect1>
816
817         <refsect1>
818                 <title>Special Passive System Units </title>
819
820                 <para>A number of special system targets are defined
821                 that can be used to properly order boot-up of optional
822                 services. These targets are generally not part of the
823                 initial boot transaction, unless they are explicitly
824                 pulled in by one of the implementing services. Note
825                 specifically that these <emphasis>passive</emphasis>
826                 target units are generally not pulled in by the
827                 consumer of a service, but by the provider of the
828                 service. This means: a consuming service should order
829                 itself after these targets (as appropriate), but not
830                 pull it in. A providing service should order itself
831                 before these targets (as appropriate) and pull it in
832                 (via a <varname>Wants=</varname> type
833                 dependency).</para>
834
835                 <para>Note that these passive units cannot be started
836                 manually, i.e. <literal>systemctl start
837                 time-sync.target</literal> will fail with an
838                 error. They can only be pulled in by dependency. This
839                 is enforced since they exist for ordering purposes
840                 only and thus are not useful as only unit within a
841                 transaction.</para>
842
843                 <variablelist>
844                         <varlistentry>
845                                 <term><filename>cryptsetup-pre.target</filename></term>
846                                 <listitem>
847                                         <para>This passive target unit
848                                         may be pulled in by services
849                                         that want to run before any
850                                         encrypted block device is set
851                                         up. All encrypted block
852                                         devices are set up after this
853                                         target has been reached. Since
854                                         the shutdown order is
855                                         implicitly the reverse
856                                         start-up order between units,
857                                         this target is particularly
858                                         useful to ensure that a
859                                         service is shut down only
860                                         after all encrypted block
861                                         devices are fully
862                                         stopped.</para>
863                                 </listitem>
864                         </varlistentry>
865                         <varlistentry>
866                                 <term><filename>local-fs-pre.target</filename></term>
867                                 <listitem>
868                                         <para>This target unit is
869                                         automatically ordered before
870                                         all local mount points marked
871                                         with <option>auto</option>
872                                         (see above). It can be used to
873                                         execute certain units before
874                                         all local mounts.</para>
875                                 </listitem>
876                         </varlistentry>
877                         <varlistentry>
878                                 <term><filename>network.target</filename></term>
879                                 <listitem>
880                                         <para>This unit is supposed to
881                                         indicate when network
882                                         functionality is available,
883                                         but it is only very weakly
884                                         defined what that is supposed
885                                         to mean, with one exception:
886                                         at shutdown, a unit that is
887                                         ordered after
888                                         <filename>network.target</filename>
889                                         will be stopped before the
890                                         network -- to whatever level
891                                         it might be set up then -- is
892                                         shut down. It is hence useful
893                                         when writing service files
894                                         that require network access on
895                                         shutdown, which should order
896                                         themselves after this target,
897                                         but not pull it in. Also see
898                                         <ulink
899                                         url="http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget">Running
900                                         Services After the Network is
901                                         up</ulink> for more
902                                         information. Also see
903                                         <filename>network-online.target</filename>
904                                         described above.</para>
905
906                                         <para>systemd automatically
907                                         adds dependencies of type
908                                         <varname>After=</varname> for
909                                         this target unit to all SysV
910                                         init script service units with
911                                         an LSB header referring to the
912                                         <literal>$network</literal>
913                                         facility.</para>
914                                 </listitem>
915                         </varlistentry>
916                         <varlistentry>
917                                 <term><filename>network-pre.target</filename></term>
918                                 <listitem>
919                                         <para>This passive target unit
920                                         may be pulled in by services
921                                         that want to run before any
922                                         network is set up, for example
923                                         for the purpose of setting up a
924                                         firewall. All network
925                                         management software orders
926                                         itself after this target, but
927                                         does not pull it in.</para>
928                                 </listitem>
929                         </varlistentry>
930                         <varlistentry>
931                                 <term><filename>nss-lookup.target</filename></term>
932                                 <listitem>
933                                         <para>A target that should be
934                                         used as synchronization point
935                                         for all host/network name
936                                         service lookups. Note that
937                                         this is independent of
938                                         user/group name lookups for
939                                         which
940                                         <filename>nss-user-lookup.target</filename>
941                                         should be used. All services
942                                         for which the availability of
943                                         full host/network name
944                                         resolution is essential should
945                                         be ordered after this target,
946                                         but not pull it in. systemd
947                                         automatically adds
948                                         dependencies of type
949                                         <varname>After=</varname> for
950                                         this target unit to all SysV
951                                         init script service units with
952                                         an LSB header referring to the
953                                         <literal>$named</literal>
954                                         facility.</para>
955                                 </listitem>
956                         </varlistentry>
957                         <varlistentry>
958                                 <term><filename>nss-user-lookup.target</filename></term>
959                                 <listitem>
960                                         <para>A target that should be
961                                         used as synchronization point
962                                         for all user/group name
963                                         service lookups. Note that
964                                         this is independent of
965                                         host/network name lookups for
966                                         which
967                                         <filename>nss-lookup.target</filename>
968                                         should be used. All services
969                                         for which the availability of
970                                         the full user/group database is
971                                         essential should be ordered
972                                         after this target, but not
973                                         pull it in. Note that system
974                                         users are always resolvable,
975                                         and hence do not require any
976                                         special ordering against this
977                                         target.</para>
978                                 </listitem>
979                         </varlistentry>
980                         <varlistentry>
981                                 <term><filename>remote-fs-pre.target</filename></term>
982                                 <listitem>
983                                         <para>This target unit is
984                                         automatically ordered before
985                                         all remote mount point units
986                                         (see above). It can be used to
987                                         run certain units before the
988                                         remote mounts are
989                                         established. Note that this
990                                         unit is generally not part of
991                                         the initial transaction,
992                                         unless the unit that wants to
993                                         be ordered before all remote
994                                         mounts pulls it in via a
995                                         <varname>Wants=</varname> type
996                                         dependency. If the unit wants
997                                         to be pulled in by the first
998                                         remote mount showing up, it
999                                         should use
1000                                         <filename>network-online.target</filename>
1001                                         (see above).</para>
1002                                 </listitem>
1003                         </varlistentry>
1004                         <varlistentry>
1005                                 <term><filename>rpcbind.target</filename></term>
1006                                 <listitem>
1007                                         <para>The portmapper/rpcbind
1008                                         pulls in this target and
1009                                         orders itself before it, to
1010                                         indicate its
1011                                         availability. systemd
1012                                         automatically adds
1013                                         dependencies of type
1014                                         <varname>After=</varname> for
1015                                         this target unit to all SysV
1016                                         init script service units with
1017                                         an LSB header referring to the
1018                                         <literal>$portmap</literal>
1019                                         facility.</para>
1020                                 </listitem>
1021                         </varlistentry>
1022                         <varlistentry>
1023                                 <term><filename>time-sync.target</filename></term>
1024                                 <listitem>
1025                                         <para>Services responsible for
1026                                         synchronizing the system clock
1027                                         from a remote source (such as
1028                                         NTP client implementations)
1029                                         should pull in this target and
1030                                         order themselves before
1031                                         it. All services where correct
1032                                         time is essential should be
1033                                         ordered after this unit, but
1034                                         not pull it in. systemd
1035                                         automatically adds
1036                                         dependencies of type
1037                                         <varname>After=</varname> for
1038                                         this target unit to all SysV
1039                                         init script service units with
1040                                         an LSB header referring to the
1041                                         <literal>$time</literal>
1042                                         facility. </para>
1043                                 </listitem>
1044                         </varlistentry>
1045                 </variablelist>
1046         </refsect1>
1047
1048         <refsect1>
1049                 <title>Special User Units</title>
1050
1051                 <para>When systemd runs as a user instance, the
1052                 following special units are available, which have
1053                 similar definitions as their system counterparts:
1054                 <filename>default.target</filename>,
1055                 <filename>shutdown.target</filename>,
1056                 <filename>sockets.target</filename>,
1057                 <filename>timers.target</filename>,
1058                 <filename>paths.target</filename>,
1059                 <filename>bluetooth.target</filename>,
1060                 <filename>printer.target</filename>,
1061                 <filename>smartcard.target</filename>,
1062                 <filename>sound.target</filename>.</para>
1063
1064                 <para>In addition, the following special unit is
1065                 understood only when systemd runs as service instance:</para>
1066
1067                 <variablelist>
1068                         <varlistentry>
1069                                 <term><filename>exit.target</filename></term>
1070                                 <listitem>
1071                                         <para>A special service unit
1072                                         for shutting down the
1073                                         user service manager.</para>
1074
1075                                         <para>Applications wanting to
1076                                         terminate the user service
1077                                         manager should start this
1078                                         unit. If systemd receives
1079                                         <constant>SIGTERM</constant> or <constant>SIGINT</constant> when running
1080                                         as user service daemon, it will
1081                                         start this unit.</para>
1082
1083                                         <para>Normally, this pulls in
1084                                         <filename>shutdown.target</filename>
1085                                         which in turn should be
1086                                         conflicted by all units that
1087                                         want to be shut down on
1088                                         user service manager exit.</para>
1089                                 </listitem>
1090                         </varlistentry>
1091                 </variablelist>
1092         </refsect1>
1093
1094         <refsect1>
1095                 <title>Special Slice Units</title>
1096
1097                 <para>There are four <literal>.slice</literal> units
1098                 which form the basis of the hierarchy for assignment
1099                 of resources for services, users, and virtual machines
1100                 or containers.</para>
1101
1102                 <variablelist>
1103                         <varlistentry>
1104                                 <term><filename>-.slice</filename></term>
1105                                 <listitem>
1106                                         <para>The root slice is the
1107                                         root of the hierarchy. It
1108                                         usually does not contain units
1109                                         directly, but may be used to
1110                                         set defaults for the whole
1111                                         tree.</para>
1112                                 </listitem>
1113                         </varlistentry>
1114
1115                         <varlistentry>
1116                                 <term><filename>system.slice</filename></term>
1117                                 <listitem>
1118                                         <para>By default, all services
1119                                         services started by
1120                                         <command>systemd</command> are
1121                                         found in this slice.</para>
1122                                 </listitem>
1123                         </varlistentry>
1124
1125                         <varlistentry>
1126                                 <term><filename>user.slice</filename></term>
1127                                 <listitem>
1128                                         <para>By default, all user
1129                                         processes and services started
1130                                         on behalf of the user,
1131                                         including the per-user systemd
1132                                         instance are found in this
1133                                         slice.</para>
1134                                 </listitem>
1135                         </varlistentry>
1136
1137                         <varlistentry>
1138                                 <term><filename>machine.slice</filename></term>
1139                                 <listitem>
1140                                         <para>By default, all virtual
1141                                         machines and containers
1142                                         registered with
1143                                         <command>systemd-machined</command>
1144                                         are found in this slice.
1145                                         </para>
1146                                 </listitem>
1147                         </varlistentry>
1148                 </variablelist>
1149         </refsect1>
1150
1151         <refsect1>
1152                   <title>See Also</title>
1153                   <para>
1154                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1155                           <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1156                           <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1157                           <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1158                           <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1159                           <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1160                           <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1161                           <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1162                   </para>
1163         </refsect1>
1164
1165 </refentry>