How To Install sudo on Ubuntu 20.04
Introduction
In this tutorial we learn how to install sudo
on Ubuntu 20.04.
What is sudo
sudo is:
Sudo is a program designed to allow a sysadmin to give limited root privileges to users and log root activity. The basic philosophy is to give as few privileges as possible but still allow people to get their work done.
This version is built with minimal shared library dependencies, use the sudo-ldap package instead if you need LDAP support for sudoers. Task: minimal
Package: sudo Architecture: amd64 Version: 1.8.31-1ubuntu1 Priority: important Section: admin Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Bdale Garbee [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 2200 Depends: libaudit1 (>= 1:2.2.1), libc6 (>= 2.27), libpam0g (>= 0.99.7.1), libselinux1 (>= 2.0.65), libpam-modules, lsb-base Conflicts: sudo-ldap Replaces: sudo-ldap Filename: pool/main/s/sudo/sudo_1.8.31-1ubuntu1_amd64.deb Size: 512808 MD5sum: d66186b0daa433aa1d938c910e6e42a2 SHA1: 9cc8e133ec01b060896c2924abd8563a60af84cc SHA256: de4106cd19a5b9f8acac9e0ab5f40f218d3ac321cc58143e051baab064a5fb36 Homepage: http://www.sudo.ws/ Description-en: Provide limited super user privileges to specific users Sudo is a program designed to allow a sysadmin to give limited root privileges to users and log root activity. The basic philosophy is to give as few privileges as possible but still allow people to get their work done.
This version is built with minimal shared library dependencies, use the sudo-ldap package instead if you need LDAP support for sudoers. Task: minimal
There are three methods to install sudo
on Ubuntu 20.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install sudo Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install sudo
using apt-get
by running the following command:
sudo apt-get -y install sudo
Install sudo Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install sudo
using apt
by running the following command:
sudo apt -y install sudo
Install sudo Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install sudo
using aptitude
by running the following command:
sudo aptitude -y install sudo
How To Uninstall sudo on Ubuntu 20.04
To uninstall only the sudo
package we can use the following command:
sudo apt-get remove sudo
Uninstall sudo And Its Dependencies
To uninstall sudo
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove sudo
Remove sudo Configurations and Data
To remove sudo
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge sudo
Remove sudo configuration, data, and all of its dependencies
We can use the following command to remove sudo
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge sudo
References
Summary
In this tutorial we learn how to install sudo
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.