Course contentsShow
← Linux
Lesson 598 of 1,8196. Systemd Internals and Unit OrchestrationFree lesson

The Target Concept Explained

Differentiate between traditional runlevels and systemd multi-user or graphical targets.

In this lesson, you will learn how systemd replaces traditional numbered runlevels with versatile, descriptive "targets" to define your system's operational state.

The Shift from Runlevels

In the older System V init system, your computer booted into a specific "runlevel," usually represented by a number. Runlevel 3 was for a multi-user text-only environment, while runlevel 5 was for a graphical desktop. These numbers were rigid and opaque; you had to memorize what 3 or 5 actually meant for your specific distribution.

systemd replaces this integer-based system with Targets. A target is simply a special type of unit file (ending in .target) that acts as a synchronization point. It defines a set of services and other units that must be active to reach a specific state.

Multi-User vs. Graphical

Under systemd, these states are named, not numbered. The two most common targets you will encounter are:

  • multi-user.target: This is the equivalent of the old runlevel 3. It brings up the network, enables local services, and provides a command-line interface.
  • graphical.target: This is the equivalent of runlevel 5. It includes everything in multi-user.target but adds an extra layer of dependency: the display manager (like GDM or SDDM) that starts your desktop environment.

You can see which target is currently active on your system by running:

systemctl get-default

To switch targets on the fly—for example, if you want to drop from a heavy desktop environment to a clean text-only terminal to troubleshoot—you can use the isolate command:

sudo systemctl isolate multi-user.target

Why Targets Are Superior

Unlike static runlevels, targets are highly modular. Because they are just unit files, they use the dependency logic we studied earlier. You can create a custom target that includes specific services or dependencies without being forced into the limitations of a hard-coded number. By grouping services into a target, systemd ensures that once the target is reached, all necessary components for that state are guaranteed to be running in the correct order.

Key Takeaway: Systemd targets replace rigid, numbered runlevels with flexible, named unit files that orchestrate complex system states through dependency management.