CompTIA Linux+ (XK0-004) — Question 206
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?
Answer options
- A. systemctl start httpd;chkconfig httpd on
- B. systemctl status httpd;chkconfig httpd on
- C. systemctl.start httpd;chkconfig httpd on
- D. systemctl start httpd;chkconfig httpd on 6
Correct answer: A
Explanation
Option A is correct because it uses 'systemctl start httpd' to start the service right away and 'chkconfig httpd on' to enable it at boot. Option B checks the service status instead of starting it, while Option C has a syntax error with the command. Option D incorrectly specifies 'on 6', which is not a valid way to enable the service to start at boot.