nerdexam
CompTIACompTIA

XK0-005 · Question #1789

XK0-005 Question #1789: Real Exam Question with Answer & Explanation

The correct answer is C: systemctl unmask httpd.service. If a systemd service is 'masked', it prevents it from being started, and the systemctl unmask command is used to remove this restriction.

Troubleshooting

Question

A web server will not start on a Linux server. A Linux administrator troubleshooting the issue runs a few commands, which produce the following output: Output 1: systemctl units Output 2: service status Output 3: firewall configuration Which of the following commands will allow the administrator to start the web server?

Options

  • Asystemctl stop firewalld.service
  • Bsystemctl daemon-reload
  • Csystemctl unmask httpd.service
  • Dsystemctl enable [email protected]

Explanation

If a systemd service is 'masked', it prevents it from being started, and the systemctl unmask command is used to remove this restriction.

Common mistakes.

  • A. Stopping the firewall service might resolve network connection issues but would not enable a masked service to start.
  • B. systemctl daemon-reload reloads systemd unit files but does not unmask a service or start one that failed for other reasons.
  • D. systemctl enable is used to configure a service to start at boot, but it will fail if the service is masked.

Concept tested. Linux systemd service management, unmasking services

Reference. https://man7.org/linux/man-pages/man1/systemctl.1.html

Topics

#systemd#service management#troubleshooting#httpd

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions