Systemd has become the default init system for most mainstream Linux distributions like Ubuntu, Fedora, Arch and openSUSE. However, some distros are bucking this trend by using lightweight alternatives like runit or sysvinit. You can easily check which init system your Linux distro is using with these two simple commands:
Method 1: Use stat to reveal details
The stat command provides information about a file. Use it on the init binary to see which init system is in use:
On a systemd system, it will output details about the systemd file.
Method 2: Use readlink to print the name
The readlink command prints the path to which a symbolic link points. When run on the init binary, it will simply output the name of the init system:
If you see “systemd”, then the SystemD init system is installed.