githubEdit

πŸ‘€Installing sudo & configuration of user and groups

circle-info

sudo is a programarrow-up-right for Unix-likearrow-up-right computer operating systemsarrow-up-right that enables users to run programs with the security privileges of another user, by default the superuserarrow-up-right. 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