How to install less on CentOS / RHEL / Fedora

In CentOS, Red Hat Enterprise Linux (RHEL), and Fedora, you can install less by using the package manager yum. Here are the steps you can follow:

  1. Start by updating the package list by running the following command:
sudo yum update
  1. Next, install less by running the following command:
sudo yum install less
  1. Once the installation is complete, you can verify that less is installed by running the following command:
less --version
  1. Once installed, you can use less by calling it in the command line followed by a file name to view the content of that file
less /path/to/file
  1. You can also use less to view the output of other commands by piping the output to less
command | less

less is a powerful command line utility that allows you to navigate through a text file, search for text, and perform other actions. It is commonly used to view log files, configuration files, and other types of text files.

Note: Depending on the version of your OS, the package name for less could be less or less-devel, you should check and use the correct package name.

Leave a Comment