How to Add User to Sudoers on Ubuntu 20.04

Create a New User

Open the root user terminal and run the following command:

# adduser username

Add a user to the sudoers file

# usermod -a -G sudo rogerp

Add with visudo

Login as root.


# visudo

Add the user with:

username      ALL=(ALL:ALL) ALL

Save file.

Ready to Go!

Leave a Comment