๐Ÿ‘คInstalling sudo & configuration of user and groups

sudo is a program for Unix-like computer operating systems that enables users to run programs with the security privileges of another user, by default the superuser. It originally stood for "superuser do", as that was all it did, and it is its most common usage; however, the official Sudo project page lists it as "su 'do' ".

Installing sudo

  1. Switch to root user: First, we need to change to the root user to install sudo. Enter the following command:

su

When prompted, enter the root password you set during installation (in our example: Hola42bcn).

  1. Install sudo package: Once you're logged in as root, run the following command:

apt install sudo

This command tells the package manager to install the required packages for sudo. Press y when prompted to confirm the installation.

  1. Reboot the system: We must reboot the machine so the changes can be applied. Use the following command:

sudo reboot
  1. Verify installation: Once the machine has rebooted, enter the encryption password and log in again. To check if sudo has been installed correctly, switch to the root user:

su

Then verify the sudo installation with:

sudo -V

This command will display the sudo version and configuration details if the installation was successful.

Last updated

Was this helpful?