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.
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 httpdonly shows the service status, it does not start the service immediately. - C.
systemctl.start httpdis a syntax error; the correct command uses a space aftersystemctl, not a dot. - D.
chkconfig httpd on 6attempts 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
Topics
Community Discussion
No community discussion yet for this question.