CompTIA Linux+ (XK0-004) — Question 121
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?
Answer options
- A. systemctl reset-failed sendmail
- B. systemctl mask sendmail
- C. systemctl stop sendmail
- D. systemctl disable sendmail
Correct answer: C
Explanation
The correct command is B, which masks the Sendmail service, preventing it from being started manually or during boot. Option A resets the failed state of the service, while option C only stops the service, allowing it to be restarted later. Option D disables the service but does not prevent it from being started manually.