Unit state
A unit may be:
active: aka started, bound, plugged in, ...inactive: aka stopped, unbound, unplugged, ...failed: likeinactive, but an error of some kind occurredactivating: changing frominactivetoactivedeactivating: changing fromactivetoinactivemaintenance:inactive+ maintenance operation in progressreloading:active+ reloading the configurationrefreshing:active+ new mountpoint is being activated inside unit namespace
Unit type
service: units deescribing how to start and control daemons;socket: units defining local IPC and network sockets;device: units exposing kernel devices to systemd;mount: units encoding information about filesystem mount points;automount: units providing automount capabalities;swap: basically like mount ounits;target: units for syncronization points and to group units;path: units used to activate services when filesystem ojects change;timer: units used to activate a unit with a timer.slice: units to group units for resource management;scope: units for managing services not started by themself
Unit Options
Units metadata options
Description=Documentation=
Dependencies options
Wants=: Weak requirements for this unit. Units listed inWants=option will start together with this unit. If for any reason they fail to start, this unit should start anyway.Requires=: units started together with this unit. If one of them fails to start, this unit won't start. If one of them is stopped, this unit will stop. If one of them is restarted, this unit will restart.Requisite=: unit won't start if these are not runningBindsTo=PartOf=Upholds=Conflicts=Before/After=: Configure ordering dependencies between units. This unit activation is delayed until all units listed inAfter=are started. Activation of units listed in theBefore=option is delayed until this unit is started.
Unit condition and assert options
Before a unit is started, Condition and Assert options a checked.
These are checked the precise moment the unit would start, meaning the ordering
dependencies (After/Before options) is respected.
If a Condition options is not met, the unit will be skipped.
If an Assert option is not met, the unit will be aborted with an error message.
In either case, the unit won't change its state (for example, from inactive to failed
<Condition/Assert>Architecture=<Condition/Assert>Firmware=<Condition/Assert>Virtualization=<Condition/Assert>Host=<Condition/Assert>KernelCommandLine=<Condition/Assert>KernelVersion=<Condition/Assert>Credentials=<Condition/Assert>Environment=<Condition/Assert>Security=<Condition/Assert>Capability==<Condition/Assert>ACPower=<Condition/Assert>NeeedsUpdate<Condition/Assert>FirstBoot<Condition/Assert>PathExists-<Condition/Assert>PathExistsGlob=<Condition/Assert>PathIsDirectory=<Condition/Assert>PathIsSymbolicLink=<Condition/Assert>PathIsMountPoint=<Condition/Assert>PathIsReadWrite=<Condition/Assert>PathIsEncrypted=<Condition/Assert>DirectoryIsNotEmpty=<Condition/Assert>FileIsNotEmpty=<Condition/Assert>FileIsExecutable=<Condition/Assert>User=<Condition/Assert>Group=<Condition/Assert>ControlGroupController=<Condition/Assert>Memory=<Condition/Assert>CPUs=<Condition/Assert>CPUFeature=<Condition/Assert>OSRelease=<Condition/Assert>MemoryPressue=<Condition/Assert>CPUPressue=<Condition/Assert>IOPressue=