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?
A.
systemctl stop httpd && systemctl mask httpd
B.
systemctl disable httpd && systemctl mask httpd
C.
systemctl stop httpd && systemctl hide httpd
D.
systemctl disable httpd && systemctl hide 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 file elsewhere untouched.
it will be B and C. When you use systemctl stop it will stop the service only in the current session, not after rebooting. To completely stop it from running automatically you have to use systemctl disable and then systemctl mask.
Just to be clear, answer A) is correct because:
1) you must first stop the service with "systemctl stop httpd"
2) the "&&" waits for the service stop to complete to close httpd gracefully
3) "systemctl mask httpd" then completely disables the service from starting on reboot or having someone start it manually at any time.
Lastly, there is NO hide command in any of the major Linux distributions that I have seen, so C cannot be right.
...you have to stop the service before you can mask it.
upvoted 3 times
...
This section is not available anymore. Please use the main Exam Page.XK0-004 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
betty_boop
Highly Voted 4 years, 4 months agoluken7777
Most Recent 1 year, 9 months agowait4thebus
2 years, 3 months agoexamtopics_htc
2 years, 6 months agoxeun88
2 years, 6 months agoDidi31
3 years, 3 months agoDBB73
3 years, 6 months ago