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
Example:
# sudo adduser mike sudo
Adding user `mike' to group `sudo' ...
Adding user mike to group sudo
Done.
![Sudoer Add New User Example Ubuntu Linux Sudoer Add New User Example Ubuntu Linux](https://code2care.org/linux/add-user-as-sudoer-using-ubuntu-linux-command-line-terminal/images/Sudoer Add New User Example Ubuntu Linux.jpg)
Let's verify the /etc/sudoer file.
# getent group sudo
sudo:x:27:mike
Documentation: https://help.ubuntu.com/community/RootSudo#Allowing_other_users_to_run_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: rakesh@code2care.org
More Posts related to Ubuntu,- Fix - sudo: systemctl: command not found
- How to know the version of Ubuntu
- [Fix] Ubuntu E: Unable to locate package sudo error
- How to install Apache Maven on Ubuntu
- Steps to Kill a Running Process in Ubuntu Linux
- How to know current Ubuntu Linux version via terminal command
- How to stop/start/restart apache server using command [Ubuntu]
- Fix: Ubuntu (Linux) - bash: sudo: command not found error
- Ubuntu: How to search for a package to install using apt in Terminal
- Fix: E: Command line option --installed is not understood in combination with the other options
- How to install Python on Ubuntu
- Ubuntu Linux: How to Login as root User
- Access Windows share folder in Ubuntu Device in Network
- Add a User as a Sudoer Using Ubuntu Linux Command Line Terminal
- Install Oh My Zsh on Ubuntu Docker complete steps
- Fix: Make makefile:31 Error 127 (GCC)
- [fix] openssl No such file or directory error C++
- How to install zsh shell on Ubuntu
- Install Golang (Go) on Ubuntu
- Ubuntu Linux: Unzip a zip file using Terminal
- Where are Environment Variables stored in Ubuntu
- apt-get list --installed packages in Ubuntu Linux
- Ubuntu: List all Installed Packages using apt
- Quick steps to install Nginx on Ubuntu Linux
- How to kill service running on a port on Ubuntu Linux
More Posts: - Microsoft Teams change default language - Teams
- How to get more information about npm using brew command - HowTos
- Resolving DNS_PROBE_FINISHED_NXDOMAIN Google Chrome Error - Google
- How to create tar.gz file using Terminal Command - Linux
- 4 Open Source SQLite Editor for Mac OS X , Windows and Linux - Mac-OS-X
- Fix: SyntaxError: ( was never closed [Python] - Java
- Java JDBC NumberFormatException: For input string - Java
- Fix: Xbox Error Code: 0x80190190 - Microsoft
Facing issues? Have Questions? Post them here! I am happy to answer!
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: rakesh@code2care.org
- Fix - sudo: systemctl: command not found
- How to know the version of Ubuntu
- [Fix] Ubuntu E: Unable to locate package sudo error
- How to install Apache Maven on Ubuntu
- Steps to Kill a Running Process in Ubuntu Linux
- How to know current Ubuntu Linux version via terminal command
- How to stop/start/restart apache server using command [Ubuntu]
- Fix: Ubuntu (Linux) - bash: sudo: command not found error
- Ubuntu: How to search for a package to install using apt in Terminal
- Fix: E: Command line option --installed is not understood in combination with the other options
- How to install Python on Ubuntu
- Ubuntu Linux: How to Login as root User
- Access Windows share folder in Ubuntu Device in Network
- Add a User as a Sudoer Using Ubuntu Linux Command Line Terminal
- Install Oh My Zsh on Ubuntu Docker complete steps
- Fix: Make makefile:31 Error 127 (GCC)
- [fix] openssl No such file or directory error C++
- How to install zsh shell on Ubuntu
- Install Golang (Go) on Ubuntu
- Ubuntu Linux: Unzip a zip file using Terminal
- Where are Environment Variables stored in Ubuntu
- apt-get list --installed packages in Ubuntu Linux
- Ubuntu: List all Installed Packages using apt
- Quick steps to install Nginx on Ubuntu Linux
- How to kill service running on a port on Ubuntu Linux
- Microsoft Teams change default language - Teams
- How to get more information about npm using brew command - HowTos
- Resolving DNS_PROBE_FINISHED_NXDOMAIN Google Chrome Error - Google
- How to create tar.gz file using Terminal Command - Linux
- 4 Open Source SQLite Editor for Mac OS X , Windows and Linux - Mac-OS-X
- Fix: SyntaxError: ( was never closed [Python] - Java
- Java JDBC NumberFormatException: For input string - Java
- Fix: Xbox Error Code: 0x80190190 - Microsoft