How to check if systemd is being used or active
How to check if systemd is being used or active?
Use the ps command to see if systemd is used as process ID (PID) 1.
ps -p 1 -o comm=Systemd is nowadays a common system and service manager for Linux systems. But how do you know for sure that it is being active? The easiest way is to have a look at PID number 1. This is the first process started after the kernel itself. With the help of ps we can determine the underlying command behind this initial process.
ps -p 1 -o comm=
This command defines what columns should be part of the output, where only shows the actual command. Adding the ‘=’ removes the header, so if systemd is being used, then the string ‘systemd’ will be returned.