Add a User as a Sudoer Using Ubuntu Linux Command Line Terminal

In order to add a User as a /etc/sudoer to run sudo commands on Ubuntu Linux, you can run the below command in the Terminal.

sudo adduser <user-name> sudo


# sudo adduser mike sudo

Adding user `mike' to group `sudo' ...
Adding user mike to group sudo
Sudoer Add New User Example Ubuntu Linux

Let's verify the /etc/sudoer file.

# getent group sudo



Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap