Adding a user in linux and making it a sudo user:

  1. Create the user first: $ adduser <username>

  2. Check if sudo is available as a group: $ cat /etc/group

  3. Add the user to sudo group: $ usermod -aG sudo <username>

Last updated