Checking the default boot target in systemd shows which system state the machine is configured to reach after a normal boot. This is useful when a server should stay in text mode, when a desktop should start a display manager automatically, or when boot behavior does not match what an administrator expects.
In the system instance, systemd boots toward the unit name that the default.target alias resolves to. The official systemctl documentation defines get-default as returning the target that default.target points to, and common results include graphical.target for graphical logins and multi-user.target for a non-graphical multi-user boot.
The reported value is the configured default rather than a one-time override for the current boot. A temporary kernel parameter such as systemd.unit=rescue.target or a manual switch into another target can change the active runtime state without rewriting the saved default, so inspect the alias files only when you need to confirm whether the target came from a local override or the vendor default.
Steps to check the default boot target in systemd:
- Open a terminal session on the system that uses systemd.
These checks are read-only and usually do not require sudo.
- Print the configured default boot target.
$ systemctl get-default graphical.target
Common results include graphical.target for a graphical login, multi-user.target for a normal non-graphical multi-user boot, and rescue.target for single-user rescue mode.
- List the most common target units if you need to compare the returned name with other boot modes.
$ systemctl list-unit-files --type=target --no-pager | grep -E '^(UNIT FILE|default.target|graphical.target|multi-user.target|rescue.target)' UNIT FILE STATE PRESET default.target alias - graphical.target static - multi-user.target static - rescue.target static -
Use this output to confirm that the saved default is an alias while the named boot targets are regular unit files.
Related: How to list systemd targets
- Inspect the alias paths on disk when you need to see whether the saved default comes from a local override or the vendor unit directory.
$ ls -l /etc/systemd/system/default.target /usr/lib/systemd/system/default.target /lib/systemd/system/default.target 2>/dev/null lrwxrwxrwx 1 root root 16 Mar 24 13:45 /usr/lib/systemd/system/default.target -> graphical.target
The 2>/dev/null redirection hides whichever vendor path your distribution does not use. If an administrator previously ran systemctl set-default, expect an /etc/systemd/system/default.target symlink that overrides the vendor alias under /usr/lib/systemd/system or /lib/systemd/system.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
