Sep 22, 2022 3 min read

How to Know if You Are Using Systemd or Some Other Init in Linux

Table of Contents

When you start a Linux system, it starts with only one process, a program called init.

Since the launch of UNIX version five (System V), the SysV init system has been the most popular and it made to the Linux systems in 1991.

It remained the most popular init system for years but gradually, many Linux distributions started using OpenRC, Runit, UpStart etc.

At present, systemd is widely used and thus you are likely to be using systemd on your system.

But how do you confirm it? You run this command:

ps -p 1 -o comm=

If you get systemd in the output, you are using systemd.

Check if systemd is in use
An Ubuntu system running systemd

That works for Linux distributions using systemd but what if you are using some other init system? Let's discuss that part as well

Checking the init system in Linux

Remember that the init is the first process to start in your Linux system.

This means that the detail lies in the process with PID 1. Check the process 1 then:

ps 1

But unfortunately, that's not enough because the the process if often showed as /sbin/init and that doesn't give accurate information.

[email protected]:~$ ps 1
      1 ?        Ss     0:01 /sbin/init splash

The /sbin/init is a symbolic link to the actual init process. You can follow the symbolic link and see real process.

I am using the stat command and you can see that /sbin/init is linked to /lib/systemd/systemd in Ubuntu.

[email protected]:~$ stat /sbin/init
  File: /sbin/init -> /lib/systemd/systemd
  Size: 20        	Blocks: 0          IO Block: 4096   symbolic link
Device: 10306h/66310d	Inode: 30675721    Links: 1
Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-09-21 09:17:59.616364311 +0530
Modify: 2022-06-27 23:58:46.000000000 +0530
Change: 2022-07-12 18:24:23.667196373 +0530
 Birth: 2022-07-12 18:24:23.667196373 +0530

This is an indication that systemd is in use.

Checking systemd in Ubuntu

Take another example. I am using Alpine Linux version 3.16. Here's the init information.

localhost:~# stat /sbin/init
  File: '/sbin/init' -> '/bin/busybox'
  Size: 12        	Blocks: 0          IO Block: 4096   symbolic link
Device: 800h/2048d	Inode: 169         Links: 1
Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-09-22 04:53:46.677137693 +0000
Modify: 2022-07-21 04:10:19.149395174 +0000
Change: 2022-07-21 04:10:19.149395174 +0000

As you can see, Alpine Linux is using the lightweight BusyBox init system.

BusyBox init system in Linux

You may also use the pstree command but that may not work in every other distribution to identify the init system.


For Ubuntu, it clearly indicates if the Linux distro is using systemd.

pstree command to check if systemd

As you can see, it might not be straightforward but it's not that complicated as well to know whether your Linux system is using systemd or not.

Abhishek Prakash
Creator of Linux Handbook and It's FOSS. An ardent Linux user & open source promoter. Huge fan of classic detective mysteries from Agatha Christie and Sherlock Holmes to Columbo & Ellery Queen.
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to Linux Handbook.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.