DEV Community

Cover image for Linux: systemD (overview + basic management)
Ilya R
Ilya R

Posted on

Linux: systemD (overview + basic management)

Overview

systemd is the system of initialization in many modern distributions based on the Linux kernel. It was developed by Red Hat Corporation in 2010. This system at one time replaced the init subsystem.

systemd is built around the concept of modules (units) . Each module has a name, a type, and manages certain services.

The main advantage of this system is the parallelism during boot process. It allows you to significantly speed up the launch of the entire operating system.

Image description

systemd can control per-process execution environment, resource limit, working directory, root directory, ID, user, group, and more. Basically systemd is the parent of all processes and it controls the whole system.

Although systemd allows you to load services faster and speed up the operation of the OS as a whole, it has a number of arguments against using this initialization system.

The fact that this init system is responsible for such a large number of different tasks and processes, and also has huge powers in the system, has led many developers and system administrators to speak out strongly against this daemon, refusing to use it in favor of classical solutions.

Linus Torvalds and Richard Stallman have also raised doubts against systemd.


Basic management

For now in many Linux distributions, all services are currently managed by the init system - systemd.

systemd have special tool which allow you to control services - systemctl

Syntax of that tool:

systemctl options command service



Let consider the most commonly used commands:
start - start service

systemctl start apache

stop - stop service

systemctl stop apache

status - show service's status

systemctl status apache

enable - add service to autoload

systemctl enable apache

disable - delete service from autoload

systemctl disable apache

list-units - show all services

systemctl list-units --type service
systemctl list-units --type service --state running

kill - send a termination signal to a process is used in conjunction with options --signal and --kill-who

restart - restart service

try-restart - restart service if service was started

Top comments (1)

Collapse
 
geraldew profile image
geraldew

Do you have references for the "Linus Torvalds and Richard Stallman have also raised doubts against systemd" ?

To my knowledge both have been quite neutral about it. Torvalds did famously call out systemd developers for some of their requests for kernel features. Stallman rarely comments on anything other than how "free" software is and the license used for systemd is fine in that regard.

There are of course, many other critics of systemd - and their views are not hard to find - enough that there are various Linux distros that avoid it (with a yet smaller number making it optional).