nerdexam
CompTIA

XK0-005 · Question #398

Users have reported that the interactive sessions were lost on a Linux server. A Linux administrator verifies the server was switched to rescue.target mode for maintenance. Which of the following…

The correct answer is B. systemctl reboot. After a Linux server was switched to rescue.target for maintenance, the administrator needs to restore it to its default operational mode.

System Management

Question

Users have reported that the interactive sessions were lost on a Linux server. A Linux administrator verifies the server was switched to rescue.target mode for maintenance. Which of the following commands will restore the server to its usual target?

Options

  • Atelinit 0
  • Bsystemctl reboot
  • Csystemctl get-default
  • Dsystemctl emergency

How the community answered

(14 responses)
  • B
    93% (13)
  • D
    7% (1)

Why each option

After a Linux server was switched to `rescue.target` for maintenance, the administrator needs to restore it to its default operational mode.

Atelinit 0

`telinit 0` shuts down the system, which does not restore it to a running 'usual target' but rather powers it off.

Bsystemctl rebootCorrect

`systemctl reboot` restarts the server, which then boots into its default configured target (e.g., `multi-user.target`), effectively restoring it to its usual operational mode from `rescue.target`.

Csystemctl get-default

`systemctl get-default` only displays the configured default target, it does not switch the system's current target or initiate a boot.

Dsystemctl emergency

`systemctl emergency` switches the system to an even more restricted `emergency.target` mode, which is the opposite of restoring normal operations.

Concept tested: Systemd targets and runlevels (rescue mode, reboot)

Source: https://www.freedesktop.org/software/systemd/man/systemctl.html

Topics

#systemd#target units#systemctl#server administration

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice