Kahibaro
Discord Login Register

What is systemd?

Overview: Where systemd Fits in Linux

systemd is the init system and service manager used by most modern Linux distributions. Its two main jobs are:

Historically, Linux systems used SysV init or other init systems; systemd replaces most of that stack with a single, integrated framework.

Key points about systemd:

You’ll use systemctl and journalctl in later sections; here we focus on what systemd is conceptually and what components it includes.


Core Goals and Design Philosophy

systemd was created to solve limitations of older init systems. Some of its main goals:

systemd as PID 1: Replacing Traditional init

On a system using systemd, if you run:

ps -p 1 -o pid,cmd

you’ll typically see:

  PID CMD
    1 /sbin/init

On systemd systems, /sbin/init is usually a symlink to systemd. As PID 1, systemd:

Unlike SysV init scripts (shell scripts in /etc/init.d), systemd uses declarative unit files that describe what should happen, not how to do it step by step.


The systemd Ecosystem: More Than One Binary

“systemd” often refers both to the init daemon and to the entire ecosystem of related components. Some important parts (names only for now; they each have their own deeper topics later):

Distributions choose which of these they actually use by default, but the core service management behavior is shared.


Units: The Building Blocks of systemd

systemd doesn’t just manage “services”. It manages many kinds of system resources, each represented by a unit.

A unit is a configuration object that systemd understands and manages. Every unit has:

You’ll learn how to manage units later; here we just focus on what they are conceptually.

Common unit types:

systemd uses these units to model almost everything about the running system, which allows consistent control and dependency management.


Dependency-Driven and Parallel Startup

A key difference from traditional init systems: systemd is dependency-driven.

Each unit can specify:

From this, systemd builds a dependency graph and:

Example idea (not full syntax):

This says: “I want the network up, and I should only start after the network is essentially ready.”


Comparison to Traditional SysV init (Conceptual)

You don’t need to know all the details of SysV init to understand systemd, but it helps to see what changed conceptually:

Most distributions still provide compatibility so old SysV scripts can be managed by systemd, but native unit files are the “modern” way.


systemd and cgroups: Process Management

systemd relies heavily on Linux control groups (cgroups) to:

This solves the classic problem where a service script stops only the main process but leaves helper processes running. With cgroups, systemd knows every process in a unit’s group and can terminate them together.


The Role of Targets: Modern “Runlevels”

systemd uses targets to represent system states or goals. Targets are units of type .target that:

Examples:

Targets are composed of dependencies on services, mounts, and other units. You’ll manage them with systemctl in the next chapter; here just remember:

Why Many Distributions Adopted systemd

Most major distributions (e.g., Debian, Ubuntu, Fedora, RHEL, openSUSE, Arch Linux) use systemd as their default init system. Reasons include:

Some Linux distributions intentionally avoid systemd for philosophical or technical reasons, but in practice, if you administer Linux servers or desktops, you’re very likely to deal with systemd.


Where You’ll Interact with systemd as an Admin

In day-to-day work, systemd matters because you’ll commonly:

In the following chapters of this section, you’ll learn:

For now, the key takeaway is that systemd is the central component coordinating how your Linux system starts, runs its services, and shuts down, using a rich, dependency-aware model built around units.

Views: 28

Comments

Please login to add a comment.

Don't have an account? Register now!