CompTIA Linux+ (XK0-005) — Question 76

A systems administrator has been tasked with disabling the nginx service from the environment to prevent it from being automatically and manually started. Which of the following commands will accomplish this task?

Answer options

Correct answer: C

Explanation

The correct command is 'systemctl mask nginx', which prevents the nginx service from being started in any way, either manually or automatically. The 'systemctl disable nginx' command only prevents it from starting automatically at boot but does not stop manual starts. The 'systemctl stop nginx' command will stop the service temporarily, but it does not prevent it from being started again.