Linux runlevels and systemd targets explained

Updated November 2026

Runlevels define what is running on a Unix system: single-user maintenance, a text-only server, or a full graphical desktop. Modern Linux replaced them with systemd targets, but the idea and many of the commands still work.

The classic runlevels

With System V init, the first process (init) ran the system in one runlevel at a time, numbered 0 to 6:

RunlevelPurpose (Red Hat style)systemd target
0Halt and power offpoweroff.target
1, SSingle-user mode for maintenance; no network, root onlyrescue.target
2Multi-user without NFS (Debian used 2 as its normal full runlevel)multi-user.target
3Full multi-user, text console: the usual server statemulti-user.target
4Unused, free for local definitionsmulti-user.target
5Multi-user with a graphical login screengraphical.target
6Rebootreboot.target

The default runlevel was set in /etc/inittab with a line such as id:3:initdefault:, and each runlevel had a directory, /etc/rc3.d and so on, full of links to start (S) and kill (K) scripts in /etc/init.d. If you maintain an old system you will still meet these files.

systemd targets

Every current major Linux distribution (Debian, Ubuntu, RHEL and its rebuilds, Fedora, SUSE, Arch) boots with systemd. Instead of numbered runlevels it has targets: named groups of services that should be running together. A target can depend on other targets, so graphical.target includes everything in multi-user.target plus the display manager.

Older systemd versions (up to 257, for example RHEL 10) kept aliases runlevel0.target to runlevel6.target and the old runlevel, init 3 and telinit commands for compatibility. systemd 258 removed them (Fedora 43, Ubuntu 26.04 and later), and Debian 13 keeps no runlevel records, so runlevel only prints unknown there. Use systemctl get-default and systemctl isolate instead.

See the current state

systemctl get-default                 # the target the system boots into
systemctl list-units --type=target    # targets that are active now
runlevel                              # older Linux only: previous and current runlevel, e.g. "N 5"
who -r                                # current runlevel on AIX, Solaris, HP-UX and older Linux

Change the target now

sudo systemctl isolate multi-user.target    # stop the graphical session, keep everything else
sudo systemctl isolate graphical.target     # start the desktop again
sudo systemctl rescue                       # single-user rescue mode
sudo systemctl poweroff                     # runlevel 0
sudo systemctl reboot                       # runlevel 6

isolate starts the named target and stops everything not needed by it, just like switching runlevels with telinit 3 used to on older systems. On a remote server, be careful: rescue and emergency stop the network, so you lose your SSH session.

Set the default target

sudo systemctl set-default multi-user.target   # boot to a text console (servers)
sudo systemctl set-default graphical.target    # boot to the graphical login

This replaces editing initdefault in /etc/inittab. It creates the link /etc/systemd/system/default.target.

Choose a target for one boot

To boot into a different target once, for example to fix a broken desktop:

  1. At the GRUB menu, highlight the entry and press e.
  2. Find the line starting with linux and add one of these at the end:
    • systemd.unit=multi-user.target (or just 3): text mode
    • systemd.unit=rescue.target (or 1, single): single-user mode, asks for the root password
    • systemd.unit=emergency.target: an even more minimal shell, root file system read-only
  3. Press Ctrl+X or F10 to boot.

To reset a forgotten root password, rescue mode does not help, because it asks for that password. Add rd.break (RHEL, Fedora; see Red Hat's documentation on resetting the root password) or init=/bin/bash to the linux line instead, or boot a live USB.

If GRUB's menu does not appear, hold Shift (BIOS) or press Esc (UEFI) during boot. When the root account is locked, as on Ubuntu, rescue mode cannot ask for a password; boot from a live USB instead (see booting Linux from USB).

Which services start in a target

systemctl list-dependencies multi-user.target   # tree of what the target pulls in
systemctl is-enabled nginx                       # will nginx start at boot?
sudo systemctl enable --now nginx                # start now and at every boot
sudo systemctl disable --now cups                # stop now and not at boot

"Enabling" a service links it into a target, usually multi-user.target, just as old init scripts were linked into /etc/rc3.d. See systemctl for everything else systemctl can do, and journalctl to read the boot log when something does not start.

Runlevels on other Unix systems

Oracle Solaris 11
Uses SMF milestones instead of runlevels: svc:/milestone/single-user, multi-user and multi-user-server. svcadm milestone switches between them, and who -r shows the equivalent runlevel. init 0, init 5 (power off) and init 6 still work.
IBM AIX
Still uses /etc/inittab and runlevels 0-9. The default is 2, which is full multi-user. Change with telinit, edit entries with mkitab and chitab, and list them with lsitab -a.
FreeBSD, OpenBSD, NetBSD
No numbered runlevels: the system boots either single-user (boot -s at the loader) or multi-user, and services are switched on in /etc/rc.conf (FreeBSD, NetBSD) or in /etc/rc.conf.local with rcctl (OpenBSD).
HP-UX
System V runlevels with /sbin/rc3.d directories and /etc/inittab. The default is 3 (full multi-user), which also starts the CDE graphical login on workstations.