Shell/Bash: add sudo user ubuntu Example


Shell/Bash Example: This is the "add sudo user ubuntu" Example. compiled from many sources on the internet by

add user to sudoers

usermod -aG sudo username

add sudo user ubuntu

# add a user and set a password
adduser USERNAME

# add user to sudoers / sudo groupe with command below
usermod -aG sudo USERNAME

add user to sudoers

echo "username  ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/username

* Summary: This "add sudo user ubuntu" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!