CompTIA
XK0-004 · Question #136
XK0-004 Question #136: Real Exam Question with Answer & Explanation
The correct answer is A: systemctl stop httpd && systemctl mask httpd. A masked service is one whose unit file is a symlink to /dev/null . This makes it "impossible" to load the service, even if it is required by another, enabled service. When you mask a service, a symlink is created from /etc/systemd/system to /dev/null , leaving the original unit
Question
A configuration management tool running every minute is enforcing the service HTTPd to be started. To perform maintenance, which of the following series of commands can be used to prevent the service from being started?
Options
- Asystemctl stop httpd && systemctl mask httpd
- Bsystemctl disable httpd && systemctl mask httpd
- Csystemctl stop httpd && systemctl hide httpd
- Dsystemctl disable httpd && systemctl hide httpd
Explanation
A masked service is one whose unit file is a symlink to /dev/null . This makes it "impossible" to load the service, even if it is required by another, enabled service. When you mask a service, a symlink is created from /etc/systemd/system to /dev/null , leaving the original unit file elsewhere
Community Discussion
No community discussion yet for this question.