How To Install less on Ubuntu 20.04
Introduction
In this tutorial we learn how to install less on Ubuntu 20.04.
What is less
less is:
This package provides “less”, a file pager (that is, a memory-efficient utility for displaying text one screenful at a time). Less has many more features than the basic pager “more”. As part of the GNU project, it is widely regarded as the standard pager on UNIX-derived systems.
Also provided are “lessecho”, a simple utility for ensuring arguments with spaces are correctly quoted; “lesskey”, a tool for modifying the standard (vi-like) keybindings; and “lesspipe”, a filter for specific types of input, such as .doc or .txt.gz files. Task: minimal
Package: less Architecture: amd64 Version: 551-1 Multi-Arch: foreign Priority: important Section: text Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Milan Kupcevic [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 308 Depends: libc6 (>= 2.14), libtinfo6 (>= 6) Filename: pool/main/l/less/less_551-1_amd64.deb Size: 125868 MD5sum: bf71b6eda239b6a5473f9ba0e0084d7d SHA1: 80c414df872b5b4e1069095a0afa023329fbe082 SHA256: e83bc31120b92879cf5553344b7554636e886d6d3b4f3ae1bccc5787518cfc2b Homepage: http://www.greenwoodsoftware.com/less/ Description-en: pager program similar to more This package provides “less”, a file pager (that is, a memory-efficient utility for displaying text one screenful at a time). Less has many more features than the basic pager “more”. As part of the GNU project, it is widely regarded as the standard pager on UNIX-derived systems.
Also provided are “lessecho”, a simple utility for ensuring arguments with spaces are correctly quoted; “lesskey”, a tool for modifying the standard (vi-like) keybindings; and “lesspipe”, a filter for specific types of input, such as .doc or .txt.gz files. Task: minimal
There are three methods to install less 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 less Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get update
After updating apt database, We can install less using apt-get by running the following command:
sudo apt-get -y install less
Install less Using apt
Update apt database with apt using the following command.
sudo apt update
After updating apt database, We can install less using apt by running the following command:
sudo apt -y install less
Install less 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 less using aptitude by running the following command:
sudo aptitude -y install less
How To Uninstall less on Ubuntu 20.04
To uninstall only the less package we can use the following command:
sudo apt-get remove less
Uninstall less And Its Dependencies
To uninstall less and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove less
Remove less Configurations and Data
To remove less configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge less
Remove less configuration, data, and all of its dependencies
We can use the following command to remove less configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge less
References
Summary
In this tutorial we learn how to install less package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.