Adding Yourself to Sudoers

Adding my account to sudoers is one of the setup steps I repeat on a new Debian machine. I prefer Debian to Ubuntu, though that is mostly habit.

Add the account

First, assume root and authenticate when prompted.

su -

Open the sudoers file through visudo.

visudo

I add my account after the root entry, replacing the placeholder with my username.

<your_account_here> ALL=(ALL:ALL)      ALL

Save the file and exit the editor, then leave the root session.

exit