2018-01-21 17:04:05 +00:00
[id='understanding-systemd']
2018-02-26 16:43:59 +00:00
= Understanding systemd
2017-12-20 14:37:20 +00:00
2020-08-05 16:48:54 +00:00
_Systemd_ is a system and service manager for Linux, compatible with SysV and LSB init scripts. _Systemd_ provides:
2017-12-20 14:37:20 +00:00
* Aggressive parallelization capabilities
* Uses socket and D-Bus activation for starting services
* Offers on-demand starting of daemons, keeps track of processes using Linux cgroups
* Supports snapshotting and restoring of the system state
* Maintains mount and automount points
* Implements an elaborate transactional dependency-based service control logic.
2020-08-05 15:59:16 +00:00
The `systemctl` command is the primary tool to manage _systemd_. It combines the functionality of SysVinit's `service` and `chkconfig` commands into a single tool you can use to enable and disable services permanently or only for the current session.
2017-12-20 14:37:20 +00:00
2020-08-05 16:48:54 +00:00
_Systemd_ manages so-called *_units_*, which are representations of system resources and services. This following list shows the unit types that _systemd_ can manage:
2017-12-20 14:37:20 +00:00
service::
A service on the system, including instructions for starting, restarting, and stopping the service.
socket::
A network socket associated with a service.
device::
2020-08-05 15:59:16 +00:00
A device specifically managed with _systemd_.
2017-12-20 14:37:20 +00:00
mount::
2020-08-05 15:59:16 +00:00
A mountpoint managed with _systemd_.
2017-12-20 14:37:20 +00:00
automount::
A mountpoint automatically mounted on boot.
swap::
Swap space on the system.
target::
A synchronization point for other units. Usually used to start enabled services on boot.
path::
A path for path-based activation. For example, you can start services based on the state of a certain path, such as whether it exists or not.
timer::
A timer to schedule activation of another unit.
snapshot::
2020-08-05 15:59:16 +00:00
A snapshot of the current _systemd_ state. Usually used to rollback after making temporary changes to _systemd_.
2017-12-20 14:37:20 +00:00
slice::
2019-08-01 00:34:32 +00:00
Restriction of resources through Linux Control Group nodes (cgroups).
2017-12-20 14:37:20 +00:00
scope::
2020-08-05 15:59:16 +00:00
Information from _systemd_ bus interfaces. Usually used to manage external system processes.