Systemd
systemd
, also known as system daemon, is a kind of init software under GNU/Linux operating system.
Systemd is a system and service manager for Linux operating systems, primarily functioning as the init system that starts and manages user space processes.
While Systemd has become the standard, some distributions still use SysV
or LSB
init scripts.
Systemd acts as PID 1, meaning it’s the first process started by the kernel, and it’s responsible for bringing up and maintaining other services.
Purpose of development:
- to provide a better framework for representing dependencies between services
- implements parallel startup of services at system initialization
- reduces shell overhead and replaces SysV style init
Ref: https://docs.rockylinux.org/books/admin_guide/16-about-sytemd/
systemd provides 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 and implements a powerful transactional dependency-based service control logic. It can work as a drop-in replacement for sysvinit.
Cheatsheet:
-
systemctl list-units grep postgres - systemctl status name.service
- systemctl start name.service
- systemctl stop name.service
- systemctl restart name.service