Linux

visudo

CautionEdit sudoers safely

visudo

Edits /etc/sudoers with syntax checking. Never edit directly — a typo can lock you out of sudo.

Examples

  • visudo -cSyntax check only

Syntax

visudo

Before you run it

A bad entry can break sudo entirely.

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store