nerdexam
CompTIACompTIA

XK0-005 · Question #1291

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

The correct answer is A: systemctl start httpd;chkconfig httpd on. To immediately start the httpd service and ensure it starts automatically upon system boot, the systemctl start command is used for the current session, and chkconfig httpd on is used for persistent enablement across reboots.

System Management

Question

A Linux administrator has downloaded and installed the httpd package. Which of the following commands will start the service immediately and allow the service to start on system boot?

Options

  • Asystemctl start httpd;chkconfig httpd on
  • Bsystemctl status httpd;chkconfig httpd on
  • Csystemctl.start httpd;chkconfig httpd on
  • Dsystemctl start httpd;chkconfig httpd on 6

Explanation

To immediately start the httpd service and ensure it starts automatically upon system boot, the systemctl start command is used for the current session, and chkconfig httpd on is used for persistent enablement across reboots.

Common mistakes.

  • B. systemctl status httpd only shows the service status, it does not start the service immediately.
  • C. systemctl.start httpd is a syntax error; the correct command uses a space after systemctl, not a dot.
  • D. chkconfig httpd on 6 attempts to specify runlevel 6, which is for rebooting the system, not a standard runlevel for service enablement for normal operation.

Concept tested. Managing services with systemctl and chkconfig

Reference. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/chap-managing_services_with_systemd

Topics

#Linux Services#Systemd#Service Management#Boot Configuration

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions