Unit file structure

Unit files consist of three main sections that define unit behavior, type-specific directives, and installation information. Understanding this structure helps you to create and change systemd units effectively.

[Unit] section
Contains generic options that do not depend on the type of the unit. These options provide a unit description, specify the unit’s behavior, and set dependencies to other units.
[<unit_type>] section
Contains type-specific directives, which are grouped under a section named after the unit type. For example, service unit files contain the [Service] section.
[Install] section
Contains information about unit installation that the systemctl enable and systemctl disable commands use.