3 Targets

By using targets, you can control systemd so that it starts only the services that are required for a specific purpose. For example, you set the default target to multi-user.target on a production server so that the graphical user interface isn't used when the system boots. In a case where you need to troubleshoot or perform diagnostics, you might consider setting the target to rescue.target, where only root logs onto the system to run the minimum number of services.

Each run level defines the services that systemd stops or starts. As an example, systemd starts network services for multi-user.target and the X Window System for graphical.target, and stops both services for rescue.target.

Table 3-1 shows the commonly used system-state targets and the equivalent runlevel targets.

Table 3-1 System-State Targets and Equivalent Runlevel Targets

System-State Targets Equivalent Runlevel Targets Description

graphical.target

runlevel5.target

Set up a multiuser system with networking and display manager.

multi-user.target

runlevel2.target

runlevel3.target

runlevel4.target

Set up a nongraphical multiuser system with networking.

poweroff.target

runlevel0.target

Shut down and power off the system.

reboot.target

runlevel6.target

Shut down and reboot the system.

rescue.target

runlevel1.target

Set up a rescue shell.

Note that runlevel* targets are implemented as symbolic links.

For more information, see the systemd.target(5) manual page.