Recommended Free Tools
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Do you desire to add a user to sudoers in the Ubuntu Linux-based OS but have no clue how to go about it? This guide is for you, as it illustrates several methods to do that.
Option 1: Add User to Sudoers Through Settings
One way to grant a user sudo privileges in Ubuntu is through the settings in the Ubuntu GUI. To learn how to do that, follow the procedures listed below.
- First, ensure you log into your Ubuntu Linux-based computer using an account with sudo privileges.
- Afterward, click the Show Applications icon on the Ubuntu dock. Now, open the settings in Ubuntu by inputting “settings” in the search field and selecting the Settings icon from the search result.


- In the Ubuntu Settings window, select Users among the menus on the left pane.

- Following that, click the Unlock… button at the top of the Users page to add users and change settings.

- Accordingly, you will be prompted to input your password for authentication. Hence, input your password in the provided input field, then click the Authenticate button.

- Now, select the user you wish to add to sudoers, then turn on the Administrator toggle under Account Settings.

Option 2: Add User to Sudo Group Through Terminal
Another way you can add a user to the sudo group in Ubuntu is by running a particular command in the terminal. As a matter of fact, there are various commands you can use to add a user to the sudo group in Ubuntu.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallHowever, we will focus on only two commands in this section. These commands are the usermod command and gpasswd command.
Popular on Amazon
- Reliable Plug and Play: The USB receiver provides a reliable wireless connection up to 33 ft (1), so you can forget about drop-outs and delays and you can take it wherever you use your computer
- Type in Comfort: The design of this keyboard creates a comfortable typing experience thanks to the low-profile, quiet keys and standard layout with full-size F-keys, number pad, and arrow keys
- Durable and Resilient: This full-size wireless keyboard features a spill-resistant design (2), durable keys and sturdy tilt legs with adjustable height
- Long Battery Life: MK270 combo features a 36-month keyboard and 12-month mouse battery life (3), along with on/off switches allowing you to go months without the hassle of changing batteries
- Easy to Use: This wireless keyboard and mouse combo features 8 multimedia hotkeys for instant access to the Internet, email, play/pause, and volume so you can easily check out your favorite sites
Thus, the following sub-sections will show you how to use these commands to grant a user sudo privileges in Ubuntu.
Add User to Sudo Group Using the Usermod Command
- Ensure you’re logged into your Ubuntu system as a root user or with an account with sudo privileges. Then, right-click any free area on the Ubuntu desktop and choose Open in Terminal from the context menu.

- When the terminal opens, execute the command below. However, replace “username” in the command with the username of the user you wish to add to the sudo group.
sudo usermod -aG sudo username
For instance, if I wish to add a user named “itechguide”, below is what the command should look like.
sudo usermod -aG sudo itechguide
Also, note that characters won’t be visible while typing your password in the Ubuntu terminal.

- After doing all that, you can confirm if the user has been added to the sudo group by executing the command below. However, replace “username” with the username of the user.
id username
For this demonstration, the username of the user is “itechguide”. So, below is what the command should look like.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Also popular on Amazon
- KEYBOARD: The keyboard works for Windows with hot keys that enable easy access to Media, My Computer, Mute, Volume up/down, and Calculator
- EASY SETUP: Experience simple installation with the USB wired connection
- VERSATILE COMPATIBILITY: This keyboard is designed to work with multiple Windows versions, including Vista, 7, 8, 10 offering broad compatibility across devices.
- SLEEK DESIGN: The elegant black color of the wired keyboard complements your tech and decor, adding a stylish and cohesive look to any setup without sacrificing function.
- FULL-SIZED CONVENIENCE: The standard QWERTY layout of this keyboard set offers a familiar typing experience, ideal for both professional tasks and personal use.
id itechguide

- After running the prior command, the output should include “27(sudo)”, indicating the user has been added to the sudo group.

Add User To Sudo Group Using the Gpasswd Command
- Sign into your Ubuntu computer as a root user or with an account in the sudo group.
- Next, open the app menu by clicking the Show Applications icon on the Ubuntu dock. Then, input “terminal ” in the search field and choose the Terminal program from the search result.

- In the Ubuntu terminal, type the following command and press the enter key. However, replace “username” with the username of the user you wish to add to sudoers.
sudo gpasswd -a username sudo
For example, if I want to add a user with a username of “John” to the sudoers, below is what the command should look like.
sudo gpasswd -a john sudo

- By doing that, you will be prompted to input your password – do so and press the enter key on your keyboard. Hence, the user should be added to sudo group.

Frequently Asked Questions
A sudo user is a regular Linux user with administrator privileges to run commands and perform tasks as a root user. Basically, a sudo or a root user can do things in Linux that a regular user can’t.
For example, a sudo user can add a new user and also access sensitive files. As a matter of fact, a sudo user can add another user to the sudo group in Linux.
To add a user to the sudo file in Ubuntu, follow the steps below.
a) First, ensure you log into your Ubuntu Linux-based computer using an account with sudo privileges.
b) Afterward, click the Show Applications icon on the Ubuntu dock.
c) Now, open the settings in Ubuntu by inputting “settings” in the search field and selecting the Settings icon from the search result.
d) In the Ubuntu Settings window, select Users among the menus on the left pane.
e) Following that, click the Unlock… button at the top of the Users page to add users and change settings.
f) Consequently, you will be prompted to input your password for authentication. Hence, input your password in the provided input field, then click the Authenticate button.
g) Now, select the user you wish to add to sudoers, then turn on the Administrator toggle under Account Settings.
Also popular on Amazon
- 【Ergonomic Design, Enhanced Typing Experience】Improve your typing experience with our computer keyboard featuring an ergonomic 7-degree input angle and a scientifically designed stepped key layout. The integrated wrist rests maintain a natural hand position, reducing hand fatigue. Constructed with durable ABS plastic keycaps and a robust metal base, this keyboard offers superior tactile feedback and long-lasting durability.
- 【15-Zone Rainbow Backlit Keyboard】Customize your PC gaming keyboard with 7 illumination modes and 4 brightness levels. Even in low light, easily identify keys for enhanced typing accuracy and efficiency. Choose from 15 RGB color modes to set the perfect ambiance for your typing adventure. After 30 minutes of inactivity, the keyboard will turn off the backlight and enter sleep mode. Press any key or "Fn+PgDn" to wake up the buttons and backlight.
- 【Whisper Quiet Design】Experience near-silent operation with our whisper-quiet gaming switch, ideal for office environments and gaming setups. The classic volcano switch structure ensures durability and an impressive lifespan of 50 million keystrokes.
- 【IP32 Spill Resistance】Our quiet gaming keyboard is IP32 spill-resistant, featuring 4 drainage holes in the wrist rest to prevent accidents and keep your game uninterrupted. Cleaning is made easy with the removable key cover.
- 【25 Anti-Ghost Keys & 12 Multimedia Keys】Enjoy swift and precise responses during games with the RGB gaming keyboard's anti-ghost keys, allowing 25 keys to function simultaneously. Control play, pause, and skip functions directly with the 12 multimedia keys for a seamless gaming experience. (Please note: Multimedia keys are not compatible with Mac)
The sudo command in Ubuntu allows sudo users to run commands with root privileges.
The command to add a user to sudo in Linux is “sudo usermod -aG sudo username” (without the quotes). However, “username” in the command should be replaced with the username of the user you wish to add to sudo.
Sudo is the acronym for “superuser do” or “substitute user do”.
Also popular on Amazon
- Take your gaming skills to the next level: The Logitech G413 SE is a full-size keyboard with gaming-first features and the durability and performance necessary to compete
- PBT keycaps: Heat- and wear-resistant, this computer gaming keyboard features the most durable material used in keycap design
- Tactile mechanical switches: Uncompromising performance is always within reach with this wired gaming keyboard
- Premium color, material and finish: Elevate your gaming setup with this backlit keyboard featuring a sleek, black-brushed aluminum top case and white LED lighting
- 6-Key rollover anti-ghosting performance: Experience reliable key input with this anti-ghosting keyboard versus non-gaming mechanical keyboards
Conclusion
Adding a user to sudoers in Ubuntu gives the user administrative/sudo privileges. Thus, the user will be able to perform administrative tasks, run programs as a root user, and execute commands with sudo privileges.
However, only trusted users can be added to the sudo group in Ubuntu. Fortunately, this guide demonstrated multiple methods to add a user to sudoers in the Ubuntu Linux-based operating system.
Precisely, we learned how to execute this task through the settings in the Ubuntu GUI. this guide also taught us two commands to grant a user sudo privileges through the Ubuntu terminal.
Also popular on Amazon
- 【65% Compact Design】GEODMAER Wired gaming keyboard compact mini design, save space on the desktop, novel black & silver gray keycap color matching, separate arrow keys, No numpad, both gaming and office, easy to carry size can be easily put into the backpack
- 【Wired Connection】Gaming Keybaord connects via a detachable Type-C cable to provide a stable, constant connection and ultra-low input latency, and the keyboard's 26 keys no-conflict, with FN+Win lockable win keys to prevent accidental touches
- 【Strong Working Life】Wired gaming keyboard has more than 10,000,000+ keystrokes lifespan, each key over UV to prevent fading, has 11 media buttons, 65% small size but fully functional, free up desktop space and increase efficiency
- 【LED Backlit Keyboard】GEODMAER Wired Gaming Keyboard using the new two-color injection molding key caps, characters transparent luminous, in the dark can also clearly see each key, through the light key can be OF/OFF Backlit, FN + light key can switch backlit mode, always bright / breathing mode, FN + ↑ / ↓ adjust the brightness increase / decrease, FN + ← / → adjust the breathing frequency slow / fast
- 【Ergonomics & Mechanical Feel Keyboard】The ergonomically designed keycap height maintains the comfort for long time use, protects the wrist, and the mechanical feeling brought by the imitation mechanical technology when using it, an excellent mechanical feeling that can be enjoyed without the high price, and also a quiet membrane gaming keyboard
Hopefully, you enjoyed this article and found it helpful. If you did, click on “Yes” beside the “Was this page helpful” question below.
You may also express your thoughts and opinions by using the “Leave a Reply” form at the bottom of this page.
Finally, you can visit our Linux how-to page to find other helpful Linux how-to guides.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

