less command not found

In this troubleshooting guide we learn how to fix less command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

less: command not found

or when using sudo you get the following error message

sudo: less: command not found

Solutions to less: command not found

How To Fix less: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu less is provided by less package.

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.

To fix this problem, we can install more using the command below.

sudo apt-get -y install less

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install less.

sudo apt -y install less

Or if you have aptitude installed you can use the following command.

sudo aptitude install less

Summary

In this tutorial we learn how to fix less command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.