> For the complete documentation index, see [llms.txt](https://noreply.gitbook.io/born2beroot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://noreply.gitbook.io/born2beroot/virtual-machine-setup/installing-sudo-and-configuration-of-user-and-groups.md).

# Installing sudo & configuration of user and groups

{% hint style="info" %} <mark style="color:green;">**sudo**</mark> is a [program](https://en.wikipedia.org/wiki/Computer_program) for [Unix-like](https://en.wikipedia.org/wiki/Unix-like) computer [operating systems](https://en.wikipedia.org/wiki/Operating_system) that enables users to run programs with the security privileges of another user, by default the [superuser](https://en.wikipedia.org/wiki/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' ".
{% endhint %}

## Installing sudo

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

```bash
su
```

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

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

```sh
apt install sudo
```

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

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

```shell
sudo reboot
```

4. **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:

```sh
su
```

Then verify the sudo installation with:

```sh
sudo -V
```

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