User Management

visudo

Safely edit the sudoers file with syntax checking.

Synopsis

syntax
visudo [OPTION]...

Examples

Edit sudoers file safely
sudo visudo
Validate sudoers syntax without editing
sudo visudo -c
Edit a specific sudoers include file
sudo visudo -f /etc/sudoers.d/custom

Common options

FlagDescription
-cCheck-only mode — validate syntax
-fEdit alternate sudoers file
-sStrict syntax checking

About visudo

The `visudo` command safely edit the sudoers file with syntax checking. User management commands handle creation, modification, and deletion of user accounts and groups.

Multi-user access control is a core feature of Linux. These commands are essential for system administrators managing servers, enforcing security policies, and provisioning access for teams.

The command accepts 3 commonly used flags shown above, though the full set of options is available in the man page (`man visudo`). The 3 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More User Management Commands

Other commands in the User Management category

Related tools