Install and use Sudo in Debian


Most of my experience with Linux is via the Ubuntu distribution, which includes sudo as a default. Debian does not have sudo or superuser accounts, here's how to add it and set it up.

Information

Debian wiki, sudo page

Install sudo:

apt install sudo -y

Once installed, add a user to the sudo group:

usermod -a -G bob sudo

Now logout of root and login to the user that was just added to the sudo group, and verify the user is authorized:

sudo -v

Linux Commands & Keyboard Shortcuts Cheat Sheet

Keeping a Linux laptop on when the lid is closed