systemd.unit
systemd
Developer
Lennart
Poettering
lennart@poettering.net
systemd.unit
5
systemd.unit
systemd unit configuration files
systemd.service
systemd.socket
systemd.device
systemd.mount
systemd.automount
systemd.swap
systemd.target
systemd.path
systemd.timer
Description
A unit configuration file encodes information
about a service, a socket, a device, a mount point, an
automount point, a swap file or patition, a start-up
target, a file system path or a timer controlled and
supervised by systemd1. The syntax is inspired by XDG
.desktop files, which are in turn
inspired by Microsoft Windows .ini
files.
This man pages lists the common configuration
options of the all unit types. These options need to
be configured either in the [Unit] resp. [Install]
section of the unit files.
Options
Unit file may include a [Unit] section, which
carries generic information about the unit that is not
dependent on the type of unit:
Names=
Additional names for
this unit. The names listed here must
have the same suffix (i.e. type) as
the unit file name. This option may be
specified more than once, in which
case all listed names are used. Note
that this option is different from the
Alias= option from
the [Install] section mentioned
below. See below for details
Requires=
Requirement
dependencies on other units. If this
units get activated the units listed
here will be activated as well. If one
of the other units gets deactivated or
its activation fails, this unit will
be deactivated. This option may be
specified more than once, in which
case requirement dependencies for all
listed names are created.
Unit file may include a [Install] section, which
carries installation information for the unit. This
section is not interpreted by
systemd1
during runtime. It is used exclusively by the
systemd-install1
during installation of a unit:
Alias=
Additional names this
unit shall be installed under. The
names listed here must have the same
suffix (i.e. type) as the unit file
name. This option may be specified
more than once, in which case all
listed names are used. At installation
time
systemd-install
will create symlinks from these names
to the unit file name. Note that this
is different from the
Names= option from
the [Unit] section mentioned above:
The names from
Names= apply
unconditionally if the unit is
loaded. The names from
Alias= apply only
if the unit is actually installed with
the systemd-install
tool. Also, if systemd searches for a
unit, it will discover symlinked alias
names, but not names configured only
with Names=. It is
a common pattern to list a name in both
options. In this case, a unit will be
active under all names if installed,
but also if not installed but
requested
explicitly.
See Also
systemd1,
systemctl8,
systemd-install1,
systemd.special7,
systemd.service5,
systemd.socket5,
systemd.device5,
systemd.mount5,
systemd.automount5,
systemd.swap5,
systemd.target5,
systemd.path5,
systemd.timer5