<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;
]>

<sect1 id="ch-scripts-usage">
  <?dbhtml filename="usage.html"?>

  <title>How does Systemd work?</title>

  <indexterm zone="ch-scripts-usage">
    <primary sortas="a-systemd-usage">Systemd usage</primary>
  <secondary>usage</secondary></indexterm>

  <warning>
    <para>Please disregard this page until it is complete and verified.</para>
  </warning>

  <sect2>
    <title>Introduction to Systemd</title>

 
    <para>Systemd is a system management daemon designed exclusively for the
    Linux kernel API. In the Linux startup process, it is the first process to
    execute in user land; therefore, it is also the parent process of all child
    processes in user land.</para>

    <para>Systemd's initialization instructions for each daemon are recorded in
    a declarative configuration file rather than a shell script. For
    inter-process communication, systemd makes Unix domain sockets and D-Bus
    available to the running daemons. Because systemd tracks processes using
    Linux cgroups instead of process identifiers (PIDs), daemons cannot "escape"
    systemd; not even by double-forking. Systemd is also capable of aggressive
    parallelization.</para>

    <para>Among systemd's auxiliary features are a cron-like job scheduler
    called systemd Calendar Timers, and an event logging subsystem called
    journal. The system administrator may choose whether to log system events
    with systemd or syslog. Systemd's logfile is a binary file. The state of
    systemd itself can be preserved in a snapshot for future recall.</para>

    <para>Systemd provides a replacement for sysvinit, pm-utils, inetd, acpid,
    syslog, watchdog, cron and atd, and obsoletes ConsoleKit.</para>

  </sect2>

  <sect2>
    <title>Systemctl</title>

    <para><command>systemctl</command> is the main command used to introspect
     and control Systemd.</para>

    <variablelist>

      <varlistentry>
        <term>List running units:</term>
        <listitem>
          <para><command>systemctl</command> or <command>systemctl list-units</command></para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>List failed units:</term>
        <listitem>
          <para><command>systemctl --failed</command></para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>List avilable unit files:</term>
        <listitem>
          <para><command>systemctl list-unit-files</command></para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>Activate a unit immediately:</term>
        <listitem>
          <para><command>systemctl start</command> <replaceable>unit</replaceable></para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>Stop a unit immediately:</term>
        <listitem>
          <para><command>systemctl stop </command><replaceable>unit</replaceable></para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>Restart a unit:</term>
        <listitem>
          <para><command>systemctl restart </command><replaceable>unit</replaceable></para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>Reload unit configuration:</term>
        <listitem>
          <para><command>systemctl reload </command><replaceable>unit</replaceable></para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>Show status of a unit:</term>
        <listitem>
          <para><command>systemctl status </command><replaceable>unit</replaceable></para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>Check if a unit is enabled or disabled:</term>
        <listitem>
          <para><command>systemctl is-enabled </command><replaceable>unit</replaceable></para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>Enable a unit to start during boot:</term>
        <listitem>
          <para><command>systemctl enable </command><replaceable>unit</replaceable></para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>Disable a unit to not start during boot:</term>
        <listitem>
          <para><command>systemctl disable </command><replaceable>unit</replaceable></para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>Reload systemd and scan for new or changed units:</term>
        <listitem>
          <para><command>systemctl daemon-reload</command></para>
        </listitem>
      </varlistentry>

    </variablelist>

    <para>For more information regarding systemd, please refer to the systemd
    and related man-pages and
    <ulink url="https://fedoraproject.org/wiki/Systemd">Systemd at
    FedoraProject</ulink> for documentation, examples, features, and other
    information.</para>

  </sect2>

</sect1>
