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