CompTIA Linux+ (XK0-005) — Question 309
A Linux administrator updated the configuration file for the httpd web service. The administrator needs to apply the updated changes to the service without interrupting any running sessions. Which of the following commands should the administrator run to accomplish this task?
Answer options
- A. systemctl reload httpd
- B. systemctl restart httpd
- C. systemctl status httpd
- D. systemctl mask httpd
Correct answer: A
Explanation
The correct command is 'systemctl reload httpd' because it allows the service to reload its configuration files without terminating existing connections. In contrast, 'systemctl restart httpd' would stop and then start the service, disrupting active sessions, while 'systemctl status httpd' merely checks the service's status and 'systemctl mask httpd' disables the service entirely.