chiark / gitweb /
cda6edd42b54a4d543403a12bd9c8076d7a726e6
[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>dbus.service</filename>,
56                 <filename>dbus.socket</filename>,
57                 <filename>default.target</filename>,
58                 <filename>display-manager.service</filename>,
59                 <filename>emergency.target</filename>,
60                 <filename>exit.target</filename>,
61                 <filename>final.target</filename>,
62                 <filename>getty.target</filename>,
63                 <filename>graphical.target</filename>,
64                 <filename>halt.target</filename>,
65                 <filename>hibernate.target</filename>,
66                 <filename>hybrid-sleep.target</filename>,
67                 <filename>initrd-fs.target</filename>,
68                 <filename>kbrequest.target</filename>,
69                 <filename>kexec.target</filename>,
70                 <filename>local-fs.target</filename>,
71                 <filename>local-fs-pre.target</filename>,
72                 <filename>multi-user.target</filename>,
73                 <filename>network.target</filename>,
74                 <filename>network-online.target</filename>,
75                 <filename>network-pre.target</filename>,
76                 <filename>nss-lookup.target</filename>,
77                 <filename>nss-user-lookup.target</filename>,
78                 <filename>paths.target</filename>,
79                 <filename>poweroff.target</filename>,
80                 <filename>printer.target</filename>,
81                 <filename>reboot.target</filename>,
82                 <filename>remote-fs.target</filename>,
83                 <filename>remote-fs-pre.target</filename>,
84                 <filename>rescue.target</filename>,
85                 <filename>initrd-root-fs.target</filename>,
86                 <filename>rpcbind.target</filename>,
87                 <filename>runlevel2.target</filename>,
88                 <filename>runlevel3.target</filename>,
89                 <filename>runlevel4.target</filename>,
90                 <filename>runlevel5.target</filename>,
91                 <filename>shutdown.target</filename>,
92                 <filename>sigpwr.target</filename>,
93                 <filename>sleep.target</filename>,
94                 <filename>smartcard.target</filename>,
95                 <filename>sockets.target</filename>,
96                 <filename>sound.target</filename>,
97                 <filename>suspend.target</filename>,
98                 <filename>swap.target</filename>,
99                 <filename>sysinit.target</filename>,
100                 <filename>syslog.socket</filename>,
101                 <filename>system-update.target</filename>,
102                 <filename>time-sync.target</filename>,
103                 <filename>timers.target</filename>,
104                 <filename>umount.target</filename>,
105                 <filename>-.slice</filename>,
106                 <filename>system.slice</filename>,
107                 <filename>user.slice</filename>,
108                 <filename>machine.slice</filename></para>
109         </refsynopsisdiv>
110
111         <refsect1>
112                 <title>Description</title>
113
114                 <para>A few units are treated specially by
115                 systemd. They have special internal semantics and
116                 cannot be renamed.</para>
117         </refsect1>
118
119         <refsect1>
120                 <title>Special System Units</title>
121
122                 <variablelist>
123                         <varlistentry>
124                                 <term><filename>basic.target</filename></term>
125                                 <listitem>
126                                         <para>A special target unit
127                                         covering basic boot-up.</para>
128                                         <para>systemd automatically
129                                         adds dependencies of the types
130                                         <varname>Requires=</varname>
131                                         and <varname>After=</varname>
132                                         for this target unit to all
133                                         services (except for those
134                                         with
135                                         <varname>DefaultDependencies=no</varname>).</para>
136
137                                         <para>Usually this should
138                                         pull-in all mount points, swap
139                                         devices, sockets, timers, and
140                                         path units and other basic
141                                         initialization necessary for
142                                         general purpose
143                                         daemons.</para>
144                                 </listitem>
145                         </varlistentry>
146                         <varlistentry>
147                                 <term><filename>ctrl-alt-del.target</filename></term>
148                                 <listitem>
149                                         <para>systemd starts this
150                                         target whenever
151                                         Control+Alt+Del is pressed on
152                                         the console. Usually this
153                                         should be aliased (symlinked)
154                                         to
155                                         <filename>reboot.target</filename>.</para>
156                                 </listitem>
157                         </varlistentry>
158                         <varlistentry>
159                                 <term><filename>cryptsetup.target</filename></term>
160                                 <listitem>
161                                         <para>A target that pulls in
162                                         setup services for all
163                                         encrypted block
164                                         devices.</para>
165                                 </listitem>
166                         </varlistentry>
167                         <varlistentry>
168                                 <term><filename>dbus.service</filename></term>
169                                 <listitem>
170                                         <para>A special unit for the
171                                         D-Bus bus daemon. As soon as
172                                         this service is fully started
173                                         up systemd will connect to it
174                                         and register its
175                                         service.</para>
176                                 </listitem>
177                         </varlistentry>
178                         <varlistentry>
179                                 <term><filename>dbus.socket</filename></term>
180                                 <listitem>
181                                         <para>A special unit for the
182                                         D-Bus system bus socket. All
183                                         units with
184                                         <varname>Type=dbus</varname>
185                                         automatically gain a
186                                         dependency on this
187                                         unit.</para>
188                                 </listitem>
189                         </varlistentry>
190                         <varlistentry>
191                                 <term><filename>default.target</filename></term>
192                                 <listitem>
193                                         <para>The default unit systemd
194                                         starts at bootup. Usually this
195                                         should be aliased (symlinked)
196                                         to
197                                         <filename>multi-user.target</filename>
198                                         or
199                                         <filename>graphical.target</filename>.</para>
200
201                                         <para>The default unit systemd
202                                         starts at bootup can be
203                                         overridden with the
204                                         <varname>systemd.unit=</varname>
205                                         kernel command line option.</para>
206                                 </listitem>
207                         </varlistentry>
208                         <varlistentry>
209                                 <term><filename>display-manager.service</filename></term>
210                                 <listitem>
211                                         <para>The display manager
212                                         service. Usually this should
213                                         be aliased (symlinked) to
214                                         <filename>gdm.service</filename>
215                                         or a similar display manager
216                                         service.</para>
217                                 </listitem>
218                         </varlistentry>
219                         <varlistentry>
220                                 <term><filename>emergency.target</filename></term>
221                                 <listitem>
222                                         <para>A special target unit
223                                         that starts an emergency
224                                         shell on the main
225                                         console. This unit is supposed
226                                         to be used with the kernel
227                                         command line option
228                                         <varname>systemd.unit=</varname>
229                                         and has otherwise little use.
230                                         </para>
231                                 </listitem>
232                         </varlistentry>
233                         <varlistentry>
234                                 <term><filename>final.target</filename></term>
235                                 <listitem>
236                                         <para>A special target unit
237                                         that is used during the
238                                         shutdown logic and may be used
239                                         to pull in late services after
240                                         all normal services are
241                                         already terminated and all
242                                         mounts unmounted.
243                                         </para>
244                                 </listitem>
245                         </varlistentry>
246                         <varlistentry>
247                                 <term><filename>getty.target</filename></term>
248                                 <listitem>
249                                         <para>A special target unit
250                                         that pulls in statically
251                                         configured local TTY
252                                         <filename>getty</filename>
253                                         instances.
254                                         </para>
255                                 </listitem>
256                         </varlistentry>
257                         <varlistentry>
258                                 <term><filename>graphical.target</filename></term>
259                                 <listitem>
260                                         <para>A special target unit
261                                         for setting up a graphical
262                                         login screen. This pulls in
263                                         <filename>multi-user.target</filename>.</para>
264
265                                         <para>Units that are needed
266                                         for graphical logins shall add
267                                         <varname>Wants=</varname>
268                                         dependencies for their unit to
269                                         this unit (or
270                                         <filename>multi-user.target</filename>)
271                                         during installation. This is
272                                         best configured via
273                                         <varname>WantedBy=graphical.target</varname>
274                                         in the unit's
275                                         <literal>[Install]</literal>
276                                         section.</para>
277                                 </listitem>
278                         </varlistentry>
279                         <varlistentry>
280                                 <term><filename>hibernate.target</filename></term>
281                                 <listitem>
282                                         <para>A special target unit
283                                         for hibernating the
284                                         system. This pulls in
285                                         <filename>sleep.target</filename>.</para>
286                                 </listitem>
287                         </varlistentry>
288                         <varlistentry>
289                                 <term><filename>hybrid-sleep.target</filename></term>
290                                 <listitem>
291                                         <para>A special target unit
292                                         for hibernating and suspending the
293                                         system at the same time. This pulls in
294                                         <filename>sleep.target</filename>.</para>
295                                 </listitem>
296                         </varlistentry>
297                         <varlistentry>
298                                 <term><filename>halt.target</filename></term>
299                                 <listitem>
300                                         <para>A special target unit
301                                         for shutting down and halting
302                                         the system. Note that this
303                                         target is distinct from
304                                         <filename>poweroff.target</filename>
305                                         in that it generally really
306                                         just halts the system rather
307                                         than powering it down.</para>
308
309                                         <para>Applications wanting to
310                                         halt the system should start
311                                         this unit.</para>
312                                 </listitem>
313                         </varlistentry>
314                         <varlistentry>
315                                 <term><filename>initrd-fs.target</filename></term>
316                                 <listitem>
317                                         <para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
318                                         automatically adds
319                                         dependencies of type
320                                         <varname>Before=</varname> to
321                                         <filename>sysroot-usr.mount</filename>
322                                         and all mount points found in
323                                         <filename>/etc/fstab</filename>
324                                         that have the
325                                         <option>auto</option> and
326                                         <option>x-initrd.mount</option>
327                                         mount options set.
328                                         </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>local-fs-pre.target</filename></term>
845                                 <listitem>
846                                         <para>This target unit is
847                                         automatically ordered before
848                                         all local mount points marked
849                                         with <option>auto</option>
850                                         (see above). It can be used to
851                                         execute certain units before
852                                         all local mounts.</para>
853                                 </listitem>
854                         </varlistentry>
855                         <varlistentry>
856                                 <term><filename>network.target</filename></term>
857                                 <listitem>
858                                         <para>This unit is supposed to
859                                         indicate when network
860                                         functionality is available,
861                                         but it is only very weakly
862                                         defined what that is supposed
863                                         to mean, with one exception:
864                                         at shutdown, a unit that is
865                                         ordered after
866                                         <filename>network.target</filename>
867                                         will be stopped before the
868                                         network -- to whatever level
869                                         it might be set up then -- is
870                                         shut down. It is hence useful
871                                         when writing service files
872                                         that require network access on
873                                         shutdown, which should order
874                                         themselves after this target,
875                                         but not pull it in. Also see
876                                         <ulink
877                                         url="http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget">Running
878                                         Services After the Network is
879                                         up</ulink> for more
880                                         information. Also see
881                                         <filename>network-online.target</filename>
882                                         described above.</para>
883
884                                         <para>systemd automatically
885                                         adds dependencies of type
886                                         <varname>After=</varname> for
887                                         this target unit to all SysV
888                                         init script service units with
889                                         an LSB header referring to the
890                                         <literal>$network</literal>
891                                         facility.</para>
892                                 </listitem>
893                         </varlistentry>
894                         <varlistentry>
895                                 <term><filename>network-pre.target</filename></term>
896                                 <listitem>
897                                         <para>This passive target unit
898                                         may be pulled in by services
899                                         that want to run before any
900                                         network is set up, for example
901                                         for the purpose of setting up a
902                                         firewall. All network
903                                         management software orders
904                                         itself after this target, but
905                                         does not pull it in.</para>
906                                 </listitem>
907                         </varlistentry>
908                         <varlistentry>
909                                 <term><filename>nss-lookup.target</filename></term>
910                                 <listitem>
911                                         <para>A target that should be
912                                         used as synchronization point
913                                         for all host/network name
914                                         service lookups. Note that
915                                         this is independent of
916                                         user/group name lookups for
917                                         which
918                                         <filename>nss-user-lookup.target</filename>
919                                         should be used. All services
920                                         for which the availability of
921                                         full host/network name
922                                         resolution is essential should
923                                         be ordered after this target,
924                                         but not pull it in. systemd
925                                         automatically adds
926                                         dependencies of type
927                                         <varname>After=</varname> for
928                                         this target unit to all SysV
929                                         init script service units with
930                                         an LSB header referring to the
931                                         <literal>$named</literal>
932                                         facility.</para>
933                                 </listitem>
934                         </varlistentry>
935                         <varlistentry>
936                                 <term><filename>nss-user-lookup.target</filename></term>
937                                 <listitem>
938                                         <para>A target that should be
939                                         used as synchronization point
940                                         for all user/group name
941                                         service lookups. Note that
942                                         this is independent of
943                                         host/network name lookups for
944                                         which
945                                         <filename>nss-lookup.target</filename>
946                                         should be used. All services
947                                         for which the availability of
948                                         the full user/group database is
949                                         essential should be ordered
950                                         after this target, but not
951                                         pull it in. Note that system
952                                         users are always resolvable,
953                                         and hence do not require any
954                                         special ordering against this
955                                         target.</para>
956                                 </listitem>
957                         </varlistentry>
958                         <varlistentry>
959                                 <term><filename>remote-fs-pre.target</filename></term>
960                                 <listitem>
961                                         <para>This target unit is
962                                         automatically ordered before
963                                         all remote mount point units
964                                         (see above). It can be used to
965                                         run certain units before the
966                                         remote mounts are
967                                         established. Note that this
968                                         unit is generally not part of
969                                         the initial transaction,
970                                         unless the unit that wants to
971                                         be ordered before all remote
972                                         mounts pulls it in via a
973                                         <varname>Wants=</varname> type
974                                         dependency. If the unit wants
975                                         to be pulled in by the first
976                                         remote mount showing up, it
977                                         should use
978                                         <filename>network-online.target</filename>
979                                         (see above).</para>
980                                 </listitem>
981                         </varlistentry>
982                         <varlistentry>
983                                 <term><filename>rpcbind.target</filename></term>
984                                 <listitem>
985                                         <para>The portmapper/rpcbind
986                                         pulls in this target and
987                                         orders itself before it, to
988                                         indicate its
989                                         availability. systemd
990                                         automatically adds
991                                         dependencies of type
992                                         <varname>After=</varname> for
993                                         this target unit to all SysV
994                                         init script service units with
995                                         an LSB header referring to the
996                                         <literal>$portmap</literal>
997                                         facility.</para>
998                                 </listitem>
999                         </varlistentry>
1000                         <varlistentry>
1001                                 <term><filename>time-sync.target</filename></term>
1002                                 <listitem>
1003                                         <para>Services responsible for
1004                                         synchronizing the system clock
1005                                         from a remote source (such as
1006                                         NTP client implementations)
1007                                         should pull in this target and
1008                                         order themselves before
1009                                         it. All services where correct
1010                                         time is essential should be
1011                                         ordered after this unit, but
1012                                         not pull it in. systemd
1013                                         automatically adds
1014                                         dependencies of type
1015                                         <varname>After=</varname> for
1016                                         this target unit to all SysV
1017                                         init script service units with
1018                                         an LSB header referring to the
1019                                         <literal>$time</literal>
1020                                         facility. </para>
1021                                 </listitem>
1022                         </varlistentry>
1023                 </variablelist>
1024         </refsect1>
1025
1026         <refsect1>
1027                 <title>Special User Units</title>
1028
1029                 <para>When systemd runs as a user instance, the
1030                 following special units are available, which have
1031                 similar definitions as their system counterparts:
1032                 <filename>default.target</filename>,
1033                 <filename>shutdown.target</filename>,
1034                 <filename>sockets.target</filename>,
1035                 <filename>timers.target</filename>,
1036                 <filename>paths.target</filename>,
1037                 <filename>bluetooth.target</filename>,
1038                 <filename>printer.target</filename>,
1039                 <filename>smartcard.target</filename>,
1040                 <filename>sound.target</filename>.</para>
1041
1042                 <para>In addition, the following special unit is
1043                 understood only when systemd runs as service instance:</para>
1044
1045                 <variablelist>
1046                         <varlistentry>
1047                                 <term><filename>exit.target</filename></term>
1048                                 <listitem>
1049                                         <para>A special service unit
1050                                         for shutting down the
1051                                         user service manager.</para>
1052
1053                                         <para>Applications wanting to
1054                                         terminate the user service
1055                                         manager should start this
1056                                         unit. If systemd receives
1057                                         <constant>SIGTERM</constant> or <constant>SIGINT</constant> when running
1058                                         as user service daemon, it will
1059                                         start this unit.</para>
1060
1061                                         <para>Normally, this pulls in
1062                                         <filename>shutdown.target</filename>
1063                                         which in turn should be
1064                                         conflicted by all units that
1065                                         want to be shut down on
1066                                         user service manager exit.</para>
1067                                 </listitem>
1068                         </varlistentry>
1069                 </variablelist>
1070         </refsect1>
1071
1072         <refsect1>
1073                 <title>Special Slice Units</title>
1074
1075                 <para>There are four <literal>.slice</literal> units
1076                 which form the basis of the hierarchy for assignment
1077                 of resources for services, users, and virtual machines
1078                 or containers.</para>
1079
1080                 <variablelist>
1081                         <varlistentry>
1082                                 <term><filename>-.slice</filename></term>
1083                                 <listitem>
1084                                         <para>The root slice is the
1085                                         root of the hierarchy. It
1086                                         usually does not contain units
1087                                         directly, but may be used to
1088                                         set defaults for the whole
1089                                         tree.</para>
1090                                 </listitem>
1091                         </varlistentry>
1092
1093                         <varlistentry>
1094                                 <term><filename>system.slice</filename></term>
1095                                 <listitem>
1096                                         <para>By default, all services
1097                                         services started by
1098                                         <command>systemd</command> are
1099                                         found in this slice.</para>
1100                                 </listitem>
1101                         </varlistentry>
1102
1103                         <varlistentry>
1104                                 <term><filename>user.slice</filename></term>
1105                                 <listitem>
1106                                         <para>By default, all user
1107                                         processes and services started
1108                                         on behalf of the user,
1109                                         including the per-user systemd
1110                                         instance are found in this
1111                                         slice.</para>
1112                                 </listitem>
1113                         </varlistentry>
1114
1115                         <varlistentry>
1116                                 <term><filename>machine.slice</filename></term>
1117                                 <listitem>
1118                                         <para>By defalt, all virtual
1119                                         machines and containers
1120                                         registered with
1121                                         <command>systemd-machined</command>
1122                                         are found in this slice.
1123                                         </para>
1124                                 </listitem>
1125                         </varlistentry>
1126                 </variablelist>
1127         </refsect1>
1128
1129         <refsect1>
1130                   <title>See Also</title>
1131                   <para>
1132                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1133                           <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1134                           <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1135                           <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1136                           <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1137                           <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1138                           <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1139                           <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1140                   </para>
1141         </refsect1>
1142
1143 </refentry>