CompTIA Linux+ (XK0-005) — Question 25

A systems administrator wants to be sure the sudo rules just added to /etc/sudoers are valid. Which of the following commands can be used for this task?

Answer options

Correct answer: A

Explanation

The correct answer is A, as 'visudo -c' specifically checks the syntax of the sudoers file for errors. Option B only checks for the existence of the file, while C and D do not validate the syntax of the sudoers rules.