XK0-005 · Question #852
A Linux administrator is configuring Apache on a system and needs to allow the service to start after every startup. Which of the following commands will allow the Linux administrator to accomplish…
The correct answer is D. systemctl enable --now httpd. The command 'systemctl enable --now httpd' accomplishes two things simultaneously: 'enable' creates the necessary symlinks so the httpd (Apache) service starts automatically at boot, and the '--now' flag immediately starts the service without requiring a separate 'systemctl…
Question
A Linux administrator is configuring Apache on a system and needs to allow the service to start after every startup. Which of the following commands will allow the Linux administrator to accomplish this task while starting the service at the same time?
Options
- Asystemctl mask --state=active httpd
- Bsystemctl start --runtime boot httpd
- Csystemctl set-property restart httpd
- Dsystemctl enable --now httpd
How the community answered
(46 responses)- A2% (1)
- B11% (5)
- C7% (3)
- D80% (37)
Explanation
The command 'systemctl enable --now httpd' accomplishes two things simultaneously: 'enable' creates the necessary symlinks so the httpd (Apache) service starts automatically at boot, and the '--now' flag immediately starts the service without requiring a separate 'systemctl start httpd' command. Option A is wrong because 'mask' prevents a service from starting. Option B uses a non-existent '--runtime boot' flag. Option C uses 'set-property restart', which modifies a service property but does not enable or start it.
Topics
Community Discussion
No community discussion yet for this question.