]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - man/systemd.special.xml
NEWS: document that the BLS is now part of our tree
[thirdparty/systemd.git] / man / systemd.special.xml
index 9c916bee6f3ccdcc3e10b7b77a662324d06dee64..fb12805fff10d795d7609ea32e137f4d479172ae 100644 (file)
@@ -3,22 +3,7 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
-
-  Copyright 2010 Lennart Poettering
-
-  systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  systemd is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  SPDX-License-Identifier: LGPL-2.1+
 -->
 
 <refentry id="systemd.special">
   <refentryinfo>
     <title>systemd.special</title>
     <productname>systemd</productname>
-
-    <authorgroup>
-      <author>
-        <contrib>Developer</contrib>
-        <firstname>Lennart</firstname>
-        <surname>Poettering</surname>
-        <email>lennart@poettering.net</email>
-      </author>
-    </authorgroup>
   </refentryinfo>
 
   <refmeta>
@@ -48,8 +24,7 @@
   </refnamediv>
 
   <refsynopsisdiv><para>
-    <!-- sort alphabetically, targets first -->
-    <filename>basic.target</filename>,
+    <!-- sort alphabetically, targets first --><filename>basic.target</filename>,
     <filename>bluetooth.target</filename>,
     <filename>cryptsetup-pre.target</filename>,
     <filename>cryptsetup.target</filename>,
@@ -64,6 +39,7 @@
     <filename>halt.target</filename>,
     <filename>hibernate.target</filename>,
     <filename>hybrid-sleep.target</filename>,
+    <filename>suspend-then-hibernate.target</filename>,
     <filename>initrd-fs.target</filename>,
     <filename>initrd-root-device.target</filename>,
     <filename>initrd-root-fs.target</filename>,
@@ -82,6 +58,7 @@
     <filename>poweroff.target</filename>,
     <filename>printer.target</filename>,
     <filename>reboot.target</filename>,
+    <filename>remote-cryptsetup.target</filename>,
     <filename>remote-fs-pre.target</filename>,
     <filename>remote-fs.target</filename>,
     <filename>rescue.target</filename>,
     <filename>suspend.target</filename>,
     <filename>swap.target</filename>,
     <filename>sysinit.target</filename>,
-    <filename>syslog.socket</filename>,
     <filename>system-update.target</filename>,
+    <filename>system-update-pre.target</filename>,
     <filename>time-sync.target</filename>,
     <filename>timers.target</filename>,
     <filename>umount.target</filename>,
-    <!-- slices -->
-    <filename>-.slice</filename>,
+    <!-- slices --><filename>-.slice</filename>,
     <filename>system.slice</filename>,
     <filename>user.slice</filename>,
     <filename>machine.slice</filename>,
-    <!-- the rest -->
+    <!-- the rest --><filename>-.mount</filename>,
     <filename>dbus.service</filename>,
     <filename>dbus.socket</filename>,
     <filename>display-manager.service</filename>,
+    <filename>init.scope</filename>,
+    <filename>syslog.socket</filename>,
     <filename>system-update-cleanup.service</filename>
   </para></refsynopsisdiv>
 
     <title>Special System Units</title>
 
     <variablelist>
+      <varlistentry>
+        <term><filename>-.mount</filename></term>
+        <listitem>
+          <para>The root mount point, i.e. the mount unit for the <filename>/</filename> path. This unit is
+          unconditionally active, during the entire time the system is up, as this mount point is where the basic
+          userspace is running from.</para>
+        </listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><filename>basic.target</filename></term>
         <listitem>
           </para>
         </listitem>
       </varlistentry>
-      <varlistentry>
-        <term><filename>getty-pre.target</filename></term>
-        <listitem>
-          <para>A special passive target unit. Users of this target
-          are expected to pull it in the boot transaction via
-          a dependency (e.g. <varname>Wants=</varname>). Order your
-          unit before this unit if you want to make use of the console
-          just before <filename>getty</filename> is started.
-          </para>
-        </listitem>
-      </varlistentry>
       <varlistentry>
         <term><filename>graphical.target</filename></term>
         <listitem>
           <filename>sleep.target</filename>.</para>
         </listitem>
       </varlistentry>
+      <varlistentry>
+        <term><filename>suspend-then-hibernate.target</filename></term>
+        <listitem>
+          <para>A special target unit for suspending the system for a period
+          of time, waking it and putting it into hibernate. This pulls in
+          <filename>sleep.target</filename>.</para>
+        </listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><filename>halt.target</filename></term>
         <listitem>
           directly.</para>
         </listitem>
       </varlistentry>
+      <varlistentry>
+        <term><filename>init.scope</filename></term>
+        <listitem>
+          <para>This scope unit is where the system and service manager (PID 1) itself resides. It is active as long as
+          the system is running.</para>
+        </listitem>
+      </varlistentry>
       <varlistentry>
         <term><filename>initrd-fs.target</filename></term>
         <listitem>
           <option>noauto</option> mount options set.</para>
         </listitem>
       </varlistentry>
+      <varlistentry>
+        <term><filename>initrd-root-device.target</filename></term>
+        <listitem>
+          <para>A special initrd target unit that is reached when the root filesystem device is available, but before
+          it has been mounted.
+          <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+          and
+          <citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+          automatically setup the appropriate dependencies to make this happen.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><filename>initrd-root-fs.target</filename></term>
+        <listitem>
+          <para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+          automatically adds dependencies of type
+          <varname>Before=</varname> to the
+          <filename>sysroot.mount</filename> unit, which is generated
+          from the kernel command line.
+          </para>
+        </listitem>
+      </varlistentry>
       <varlistentry>
         <term><filename>kbrequest.target</filename></term>
         <listitem>
           it. Note that networking daemons that simply provide
           functionality to other hosts generally do not need to pull
           this in.</para>
+
+          <para>systemd automatically adds dependencies of type <varname>Wants=</varname> and <varname>After=</varname>
+          for this target unit to all SysV init script service units with an LSB header referring to the
+          <literal>$network</literal> facility.</para>
+
+          <para>Note that this unit is only useful during the original system start-up logic. After the system has
+          completed booting up, it will not track the online state of the system anymore. Due to this it cannot be used
+          as a network connection monitor concept, it is purely a one-time system start-up concept.</para>
           </listitem>
       </varlistentry>
       <varlistentry>
           <para>A special target unit for shutting down and powering
           off the system.</para>
 
-          <para>Applications wanting to reboot the system should not start this unit
+          <para>Applications wanting to power off the system should not start this unit
           directly, but should instead execute <command>systemctl poweroff</command>
           (possibly with the <option>--no-block</option> option) or call
           <citerefentry><refentrytitle>systemd-logind</refentrytitle><manvolnum>8</manvolnum></citerefentry>'s
           this target unit, for compatibility with SysV.</para>
         </listitem>
       </varlistentry>
+      <varlistentry>
+        <term><filename>remote-cryptsetup.target</filename></term>
+        <listitem>
+          <para>Similar to <filename>cryptsetup.target</filename>, but for encrypted
+          devices which are accessed over the network. It is used for
+          <citerefentry><refentrytitle>crypttab</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+          entries marked with <option>_netdev</option>.</para>
+        </listitem>
+      </varlistentry>
       <varlistentry>
         <term><filename>remote-fs.target</filename></term>
         <listitem>
           shell. Isolate to this target in order to administer the system in single-user mode with all file systems
           mounted but with no services running, except for the most basic. Compare with
           <filename>emergency.target</filename>, which is much more reduced and does not provide the file systems or
-          most basic services.</para>
+          most basic services. Compare with <filename>multi-user.target</filename>, this target could be seen as
+          <filename>single-user.target</filename>.</para>
 
           <para><filename>runlevel1.target</filename> is an alias for this target unit, for compatibility with
           SysV.</para>
           SysV.</para>
         </listitem>
       </varlistentry>
-      <varlistentry>
-        <term><filename>initrd-root-device.target</filename></term>
-        <listitem>
-          <para>A special initrd target unit that is reached when the root filesystem device is available, but before
-          it has been mounted.
-          <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-          and
-          <citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-          automatically setup the appropriate dependencies to make this happen.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><filename>initrd-root-fs.target</filename></term>
-        <listitem>
-          <para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-          automatically adds dependencies of type
-          <varname>Before=</varname> to the
-          <filename>sysroot.mount</filename> unit, which is generated
-          from the kernel command line.
-          </para>
-        </listitem>
-      </varlistentry>
       <varlistentry>
         <term><filename>runlevel2.target</filename></term>
         <term><filename>runlevel3.target</filename></term>
         <listitem>
           <para>A special target unit that sets up all slice units (see
           <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
-          details) that shall be active after boot. By default the generic <filename>user.slice</filename>,
-          <filename>system.slice</filename>, <filename>machines.slice</filename> slice units, as well as the root
-          slice unit <filename>-.slice</filename> are pulled in and ordered before this unit (see below).</para>
+          details) that shall be active after boot. By default the generic <filename>system.slice</filename>
+          slice unit, as well as the root slice unit <filename>-.slice</filename>, is pulled in and ordered before
+          this unit (see below).</para>
 
           <para>It's a good idea to add <varname>WantedBy=slices.target</varname> lines to the <literal>[Install]</literal>
           section of all slices units that may be installed dynamically.</para>
       </varlistentry>
       <varlistentry>
         <term><filename>system-update.target</filename></term>
+        <term><filename>system-update-pre.target</filename></term>
         <term><filename>system-update-cleanup.service</filename></term>
         <listitem>
           <para>A special target unit that is used for offline system updates.
           <citerefentry><refentrytitle>systemd.offline-updates</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
           </para>
 
-          <para>Updates should happen before the <filename>system-update.target</filename> is
-          reached, and the services which implement them should cause the machine to reboot. As
-          a safety measure, if this does not happen, and <filename>/system-update</filename>
-          still exists after <filename>system-update.target</filename> is reached,
-          <filename>system-update-cleanup.service</filename> will remove this symlink and
-          reboot the machine.</para>
+          <para>Updates should happen before the <filename>system-update.target</filename> is reached, and the services
+          which implement them should cause the machine to reboot. The main units executing the update should order
+          themselves after <filename>system-update-pre.target</filename> but not pull it in. Services which want to run
+          during system updates only, but before the actual system update is executed should order themselves before
+          this unit and pull it in. As a safety measure, if this does not happen, and
+          <filename>/system-update</filename> still exists after <filename>system-update.target</filename> is reached,
+          <filename>system-update-cleanup.service</filename> will remove this symlink and reboot the machine.</para>
         </listitem>
       </varlistentry>
       <varlistentry>
           stopped.</para>
         </listitem>
       </varlistentry>
+      <varlistentry>
+        <term><filename>getty-pre.target</filename></term>
+        <listitem>
+          <para>A special passive target unit. Users of this target
+          are expected to pull it in the boot transaction via
+          a dependency (e.g. <varname>Wants=</varname>). Order your
+          unit before this unit if you want to make use of the console
+          just before <filename>getty</filename> is started.
+          </para>
+        </listitem>
+      </varlistentry>
       <varlistentry>
         <term><filename>local-fs-pre.target</filename></term>
         <listitem>
           information. Also see
           <filename>network-online.target</filename> described
           above.</para>
-
-          <para>systemd automatically adds dependencies of type
-          <varname>After=</varname> for this target unit to all SysV
-          init script service units with an LSB header referring to
-          the <literal>$network</literal> facility.</para>
         </listitem>
       </varlistentry>
       <varlistentry>
       <varlistentry>
         <term><filename>nss-lookup.target</filename></term>
         <listitem>
-          <para>A target that should be used as synchronization point
-          for all host/network name service lookups. Note that this is
-          independent of user/group name lookups for which
-          <filename>nss-user-lookup.target</filename> should be used.
-          All services for which the availability of full host/network
-          name resolution is essential should be ordered after this
-          target, but not pull it in. systemd automatically adds
-          dependencies of type <varname>After=</varname> for this
-          target unit to all SysV init script service units with an
-          LSB header referring to the <literal>$named</literal>
-          facility.</para>
+          <para>A target that should be used as synchronization point for all host/network name service lookups. Note
+          that this is independent of UNIX user/group name lookups for which <filename>nss-user-lookup.target</filename>
+          should be used.  All services for which the availability of full host/network name resolution is essential
+          should be ordered after this target, but not pull it in. systemd automatically adds dependencies of type
+          <varname>After=</varname> for this target unit to all SysV init script service units with an LSB header
+          referring to the <literal>$named</literal> facility.</para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term><filename>nss-user-lookup.target</filename></term>
         <listitem>
-          <para>A target that should be used as synchronization point
-          for all user/group name service lookups. Note that this is
-          independent of host/network name lookups for which
-          <filename>nss-lookup.target</filename> should be used. All
-          services for which the availability of the full user/group
-          database is essential should be ordered after this target,
-          but not pull it in. Note that system users are always
-          resolvable, and hence do not require any special ordering
-          against this target.</para>
+          <para>A target that should be used as synchronization point for all regular UNIX user/group name service
+          lookups. Note that this is independent of host/network name lookups for which
+          <filename>nss-lookup.target</filename> should be used. All services for which the availability of the full
+          user/group database is essential should be ordered after this target, but not pull it in. All services which
+          provide parts of the user/group database should be ordered before this target, and pull it in. Note that this
+          unit is only relevant for regular users and groups — system users and groups are required to be resolvable
+          during earliest boot already, and hence do not need any special ordering against this target.</para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term><filename>remote-fs-pre.target</filename></term>
         <listitem>
           <para>This target unit is automatically ordered before all
-          remote mount point units (see above). It can be used to run
-          certain units before the remote mounts are established. Note
-          that this unit is generally not part of the initial
+          mount point units (see above) and cryptsetup devices
+          marked with the <option>_netdev</option>. It can be used to run
+          certain units before remote encrypted devices and mounts are established.
+          Note that this unit is generally not part of the initial
           transaction, unless the unit that wants to be ordered before
           all remote mounts pulls it in via a
           <varname>Wants=</varname> type dependency. If the unit wants
@@ -986,17 +998,17 @@ PartOf=graphical-session.target
   <refsect1>
     <title>Special Slice Units</title>
 
-    <para>There are four <literal>.slice</literal> units which form
-    the basis of the hierarchy for assignment of resources for
-    services, users, and virtual machines or containers.</para>
+    <para>There are four <literal>.slice</literal> units which form the basis of the hierarchy for assignment of
+    resources for services, users, and virtual machines or containers. See
+    <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>7</manvolnum></citerefentry> for details about slice
+    units.</para>
 
     <variablelist>
       <varlistentry>
         <term><filename>-.slice</filename></term>
         <listitem>
-          <para>The root slice is the root of the hierarchy. It
-          usually does not contain units directly, but may be used to
-          set defaults for the whole tree.</para>
+          <para>The root slice is the root of the slice hierarchy. It usually does not contain units directly, but may
+          be used to set defaults for the whole tree.</para>
         </listitem>
       </varlistentry>
 
@@ -1013,7 +1025,8 @@ PartOf=graphical-session.target
         <listitem>
           <para>By default, all user processes and services started on
           behalf of the user, including the per-user systemd instance
-          are found in this slice.</para>
+          are found in this slice.  This is pulled in by
+          <filename>systemd-logind.service</filename></para>
         </listitem>
       </varlistentry>
 
@@ -1022,8 +1035,8 @@ PartOf=graphical-session.target
         <listitem>
           <para>By default, all virtual machines and containers
           registered with <command>systemd-machined</command> are
-          found in this slice.
-          </para>
+          found in this slice.  This is pulled in by
+          <filename>systemd-machined.service</filename></para>
         </listitem>
       </varlistentry>
     </variablelist>
@@ -1038,7 +1051,7 @@ PartOf=graphical-session.target
         <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
         <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
         <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-        <citerefentry project='man-pages'><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+        <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
         <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
       </para>
   </refsect1>