visudo

Safely edit the sudoers file. More information: <https://www.sudo.ws/docs/man/visudo.man>.

Install

All systems
curl cmd.cat/visudo.sh
Debian Debian
apt-get install sudo
Ubuntu
apt-get install sudo
Alpine
apk add sudo
Arch Arch Linux
pacman -S sudo
image/svg+xml Kali Linux
apt-get install sudo
CentOS
yum install sudo
Fedora
dnf install sudo
Windows (WSL2)
sudo apt-get update sudo apt-get install sudo
Raspbian
apt-get install sudo
Docker
docker run cmd.cat/visudo visudo powered by Commando

Safely edit the sudoers file. More information: <https://www.sudo.ws/docs/man/visudo.man>.

  • Edit the sudoers file:
    sudo visudo
  • Check the sudoers file for errors:
    sudo visudo -c
  • Edit the sudoers file using a specific editor:
    sudo EDITOR=editor visudo
  • Display version information:
    visudo --version

© tl;dr; authors and contributors