« Back to Systemd: Frequently Asked Questions

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.

Other questions related to Systemd

    Related articles

    Like to learn more? Here is a list of articles within the same category or having similar tags.

    Feedback

    Small picture of Michael Boelen

    This article has been written by our Linux security expert Michael Boelen. With focus on creating high-quality articles and relevant examples, he wants to improve the field of Linux security. No more web full of copy-pasted blog posts.

    Discovered outdated information or have a question? Share your thoughts. Thanks for your contribution!

    Mastodon icon