exam questions

Exam XK0-004 All Questions

View all questions & answers for the XK0-004 exam

Exam XK0-004 topic 1 question 253 discussion

Actual exam question from CompTIA's XK0-004
Question #: 253
Topic #: 1
[All XK0-004 Questions]

A Linux administrator needs to disable the Sendmail service on a Linux server and prevent it from being started manually and during boot.
Which of the following is the BEST command to do this?

  • A. systemctl reset-failed sendmail
  • B. systemctl mask sendmail
  • C. systemctl stop sendmail
  • D. systemctl disable sendmail
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
[Removed]
Highly Voted 4 years, 3 months ago
B. systemctl mask sendmail should be the right answer.
upvoted 8 times
...
JosiahJ
Highly Voted 4 years, 3 months ago
B is the correct answer. Mask will link the service to /dev/null making it impossible to start the service unless it is unmasked.
upvoted 6 times
...
CarlosC
Most Recent 3 years, 3 months ago
Use caution when employing the systemctl mask command on a service. This links the service to the /dev/null (black hole) to prevent any kind of service startup. This has been described as the “third level of off.” You will not be able to start the service manually. Also, the service will not start at boot time if you did not employ the ––running option when you used mask on it. You
upvoted 3 times
CarlosC
3 years, 3 months ago
https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units Masking and Unmasking Units We saw in the service management section how to stop or disable a service, but systemd also has the ability to mark a unit as completely unstartable, automatically or manually, by linking it to /dev/null. This is called masking the unit, and is possible with the mask command
upvoted 1 times
...
...
Nathanf123
3 years, 6 months ago
Why not systemctl disable ?
upvoted 1 times
Nathanf123
3 years, 5 months ago
Answer is B. Mask allows you to prevent it from starting manually and during boot.
upvoted 3 times
...
...
o0o0
4 years, 2 months ago
B should be the right answer as mask prevent the designated unit to be started with the start (manual start) and a system boot.
upvoted 4 times
...
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.

SaveCancel
Loading ...