How to solve ubuntu cli error "exec: "less": executable file not found in $PATH"

During the execution of some commands with tools like the Plesk binaries, you will face an exception about a missing executable that have been not found on the $PATH. This happen commonly with the less utility (not the CSS preprocessor but the unix less tool).

Less is an utility to display some plain text on the terminal screen. It is able to show a file line by line, although is not possible to manipulate or edit the text. Besides, their commands are based on the well known "vi" editor, which is different in that it does not have to read all the contents of the file before being opened (performance at its max expression).

If you face this excepcion when running some command that will display some text on the terminal, the issue is that you don't have the less utility installed on your system. This happens usually on debian based operative systems and specially on Ubuntu distributions that are mounted on AWS servers.

Solution

Install the less utility with the following command on debian based systems:

sudo apt-get install less

Happy coding !

This could interest you
Become a more social person