Prerequisites
- You must have root access (root password or console access).
- The system must use APT (Debian/Ubuntu).
Guide
- Switch to the root user
Bash
su -- Update the system
Bash
apt upgrade
apt install sudo- Install sudo
Bash
apt install sudo- Add your user to the sudo group
Bash
usermod -a -G sudo [username]- Apply the group change
Bash
su [username]- Test Sudo
Run the following commands:
Bash
sudo whoamiIf it prints:
Bash
rootYou’re done!