Overview
Definition of systemd
According to Lennart Poettering, the developper of systemd:
"systemd is a system and session manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting devices."
In Simpler Terms:
systemd is a more efficient method of controlling processes. It has the flexibility to start services in parallel, and have them communicate with each other, even if they are restarted (respawned). This is particularly useful for system administrators to temporarily service or update services without affecting the other dependent services.
The Old Way: init
Upon computer boot-up, and after the Kernel process is started, it traditionally launched the init process (usually PID 1). This important process manages (launches) other common services. The init process also has the ability to manage process (for example, respawing or "restarting" processes if they are terminated for some reason). In many ways, the init process is the "ancestor process" and any process that is currently running on the Unix/Linux system is either directly or indirectly related to the init process. Traditionally, the init program would run default processes that were defined in "shell scripts" contained in appropriate run-level directory. The run level is a defined state that the Unix/Linux system is currently in (for example, graphical-mode, text-based mode with networking, text-based mode without networking, etc). |
Why Switch to systemd?Why switch to systemd when the concept of init and run levels seemed to work for 40 years! If it isn't broke, why try to fix it?
The init process may force certain services to be launched in a particular sequence. For example, the Bluetooth process cannot launch until the avahi process launches. On the other hand, the avahi process cannot launch until the D-BUS process launches, which cannot start until the syslog process is launched. |
syslog
V |
D-Bus
V |
Avahi
V |
BlueTooth
V The traditional method can take time, and cause problems if a dependent process restarts. On the other hand, systemd launches all process in parallel (at same time), but allows them to communicate with each other (via sockets) for "on-demand" communication. This helps to improve efficiencies when running services, and makes it easier for system administrators to update services without "side effects" to the other dependent services. |
D-Bus | Avahi | BlueTooth
V V V V
The New Way: systemdSystem UnitsServices are organized in terms of units which consist of a name and a type which correspond to a configuration file. There are seven different types of units:
systemd Command Usagesystemctl: used to start/stop/restart/reload the appropriate service.
Additional Resources
|