Running services with init and systemd
Let’s use this opportunity to discuss the init
and the systemd
process daemons. There are others as well, but we’ve decided to retain our focus on these two. The first one is the initial process, executed on a Linux system by the kernel, and its pid
is always 1
:
$ ps -p 1 PID TTY          TIME CMD 1 ?        04:53:20 systemd
It is known as the parent of all processes on the system as it is used to initialize, manage, and track other services and daemons. The first init
daemon for Linux is called Init
and it defines six system states. All system services are mapped to those states, respectively. Its script is used to start processes in a pre-defined order, which is occasionally used by system programmers. One possible reason to use this is to reduce the startup duration of the system. To create a service or edit the script, you could modify...