A Linux administrator needs to change the runlevel of a systemd-based system to a state where only a single user can log in for maintenance, without starting network services. Which systemd target should the administrator use?
The rescue.target is a systemd target that provides a single-user environment with basic system services, but does not start network services. It is equivalent to the traditional runlevel 1 (single-user mode). This target is designed for maintenance and allows only the root user to log in on the console.
Why this answer
The rescue.target is the systemd equivalent of single-user mode, providing a minimal environment with only essential services and no networking. It allows the administrator to log in as root for maintenance tasks. The emergency.target is more restrictive and mounts the root filesystem read-only, while multi-user and graphical targets start networking and multiple users.
Therefore, rescue.target is the correct choice.
Exam trap
The trap here is confusing rescue.target with emergency.target; rescue.target provides a usable single-user shell with basic services, while emergency.target is even more minimal and may not allow normal login.