visudo

The command that edits sudoers files safely and, with -c, checks that every sudoers file parses.

In more detail

A syntax error in a sudoers file can stop sudo working entirely, so check after every change. visudo -f edits a drop-in in /etc/sudoers.d.

Example

visudo -c

Related terms

Taught in

References

Certification courses