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: Rakesh
Author Info:

Rakesh is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

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