Skip to content
hostcomplex

What Is systemd?

Maarten Soetens 3 min read

Init Systems and Why Linux Needs One

systemd is an init system and service manager for Linux. An init system is the first program the kernel starts after boot. It runs with process ID 1 and starts everything else: networking, the database, the web server and the background programs, called daemons, that keep running without anyone logged in.

Before systemd, many distributions used the older SysV init system, which started services one after another through shell scripts. Other init systems, such as Upstart and OpenRC, have also been used. systemd starts services in parallel where it can and tracks what each one needs, so a service that depends on the network waits until the network is ready. It is the default on most widely used server distributions, including those in the Debian, Ubuntu and Red Hat families.

Units, Services and Timers Explained

systemd manages everything through units. A unit is a configuration file that describes one resource, and the file extension shows its type:

  • Service units (.service): a daemon such as a web server or database, including how to start it, stop it and restart it if it crashes.
  • Timer units (.timer): a schedule that starts another unit at set times. This is the systemd counterpart of a cron job.
  • Socket units (.socket): a network or local socket that can start a service when a connection arrives.
  • Target units (.target): a group of units that together represent a system state, such as the normal multi-user state of a server.

Timers are a common alternative to cron. They can be set to run a task that was missed while the system was off, and they can be tied to events such as boot. Their schedules use a different format from cron. For comparison, see how cron jobs work.

How journald and systemctl Show What Is Happening

systemd also includes a logging component called journald. Instead of writing plain text lines to separate files, journald collects messages from services and the kernel into a structured journal. Administrators read it with the journalctl command and can filter by service or by time. Some distributions also forward messages to traditional text log files. Where those files are kept is explained in the guide to Linux log files.

The systemctl command is the main tool for asking systemd about units, such as whether a service is running and why it stopped. This is why server documentation often refers to systemd when a service fails to start.

Frequently asked questions

Is systemd the same as Linux?

No. Linux is the kernel, and systemd is a separate program that runs on top of it as the init system and service manager. The kernel manages hardware and processes, while systemd decides which services start, in what order and when. Some Linux distributions use other init systems, so a Linux machine can run without systemd.

Why do server guides keep mentioning systemd?

Because systemd controls the services that make a server work. When a web server, database or background worker must start, stop or restart, the administrator usually uses systemd to do it. Knowing its basic terms, such as units and journal, makes it easier to understand why a service is failing after a configuration change.

  • Two-Factor Authentication

    Two factor authentication hosting adds a second check to control panel, domain and CMS logins. Learn which methods are strongest and why 2FA helps.

  • What Is an A Record?

    What is an A record? Learn how this DNS record maps a hostname to an IPv4 address, why domains use several A records and the root and www pattern.

  • Billing and Automation Platforms

    What is WHMCS? Learn how this commercial billing and automation platform helps hosts sell plans, collect payments and create accounts automatically.