Important [Unit] section options

The [Unit] section has generic options that are not dependent on the type of the unit. These options have a unit description, specify the unit’s behavior, and set dependencies to other units.

Table 1. Important [Unit] section options
Option 1 Description

Description

A meaningful description of the unit. This text is displayed for example in the output of the systemctl status command.

Documentation

Provides a list of URIs referencing documentation for the unit.

After 2

Defines the order in which units are started. The unit starts only after the units specified in After are active. Unlike Requires, After does not explicitly activate the specified units. The Before option has the opposite functionality to After.

Requires

Configures dependencies on other units. The units listed in Requires are activated together with the unit. If any of the required units fail to start, the unit is not activated.

Wants

Configures weaker dependencies than Requires. If any of the listed units does not start successfully, it has no impact on the unit activation. This is the suggested way to establish custom unit dependencies.

Conflicts

Configures negative dependencies, an opposite to Requires.

1 For a complete list of options configurable in the [Unit] section, see the systemd.unit(5) manual page.
2 In most cases, it is sufficient to set only the ordering dependencies with After and Before unit file options. If you also set a requirement dependency with Wants (suggested) or Requires, the ordering dependency still needs to be specified. That is because ordering and requirement dependencies work independently from each other.