nerdexam
CompTIA

XK0-005 · Question #614

An administrator needs to make an application change via a script that must be run only in console mode. Which of the following best represents the sequence the administrator should execute to…

The correct answer is A. systemctl isolate multi-user.target. This sequence will allow the administrator to switch from the graphical mode to the console mode, run the script, and then switch back to the graphical mode. The systemctl command is used to control the systemd system and service manager, which manages the boot targets and…

System Management

Question

An administrator needs to make an application change via a script that must be run only in console mode. Which of the following best represents the sequence the administrator should execute to accomplish this task?

Options

  • Asystemctl isolate multi-user.target
  • Bsystemctl isolate graphical.target
  • Csh script.sh
  • Dsystemctl isolate multi-user.target

How the community answered

(16 responses)
  • A
    94% (15)
  • B
    6% (1)

Explanation

This sequence will allow the administrator to switch from the graphical mode to the console mode, run the script, and then switch back to the graphical mode. The systemctl command is used to control the systemd system and service manager, which manages the boot targets and services on Linux systems. The isolate subcommand starts the unit specified on the command line and its dependencies and stops all others. The multi-user.target is a boot target that provides a text-based console login, while the graphical.target is a boot target that provides a graphical user interface. By using systemctl isolate, the administrator can change the boot target on the fly without rebooting the system. The sh command is used to run a shell script, which is a file that contains a series of commands that can be executed by the shell. The script.sh is the name of the script that contains the application change that the administrator needs to make. By running sh script.sh, the administrator can execute the script in the console mode.

Topics

#systemd#system targets#runlevels#console mode

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice