How To Install sudo on AlmaLinux 8
Introduction
In this tutorial we learn how to install sudo on AlmaLinux 8.
What is sudo
Sudo (superuser do) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root while logging all commands and arguments. Sudo operates on a per-command basis. It is not a replacement for the shell. Features include per-host basis, copious logging of each command (providing a clear audit trail of who did what), a configurable timeout of the sudo command, and the ability to use the same configuration file (sudoers) on many different machines.
We can use yum or dnf to install sudo on AlmaLinux 8. In this tutorial we discuss both methods but you only need to choose one of method to install sudo.
Install sudo on AlmaLinux 8 Using dnf
Update yum database with dnf using the following command.
sudo dnf makecache --refresh
After updating yum database, We can install sudo using dnf by running the following command:
sudo dnf -y install sudo
Install sudo on AlmaLinux 8 Using yum
Update yum database with yum using the following command.
sudo yum makecache --refresh
After updating yum database, We can install sudo using yum by running the following command:
sudo yum -y install sudo
How To Uninstall sudo on AlmaLinux 8
To uninstall only the sudo package we can use the following command:
sudo dnf remove sudo
References
Summary
In this tutorial we learn how to install sudo on AlmaLinux 8 using yum and dnf.