Home » Guides » How to Install Ranger on Linux: Debian, RHEL, CentOS, Arch Linux, Ubuntu, Manjaro, etc.

How to Install Ranger on Linux: Debian, RHEL, CentOS, Arch Linux, Ubuntu, Manjaro, etc.

File managers have always been crucial for any system. It is the most basic way of looking at the files stored in your local storage. On OSes like Windows or Mac, wonderful file explorers offer beautiful GUIs that are built natively. However, that is not the case for Linux.

Commonly, users rely on commands like ls and ll to view the file metadata. But what if there is a file manager with a much better text-based interface? If you do not want to exit your terminal at all and still want to view files on your system, then Ranger is the tool for you.

Fans of the minimalistic design will appreciate Ranger more. It allows them to navigate through the files as well as preview them in a text-based interface. It is a lightweight, open-source tool that allows users to preview files without leaving the terminal. Thus, we are here to offer you instructions on how to install Ranger on multiple Linux distributions.

Table Of Contents

What is Ranger?

Ranger is a free, open-source file manager, written in Python. It utilizes a text-based interface for UNIX systems. Roman Zimbelmann developed the tool and has a General Public License. The tool allows users to manage files with a few keystrokes. It shows file metadata and previews under different directories.

Ranger, install ranger on Linux
Ranger

Features Offered:

  • UTF-8 Support, only if you are running Python 3
  • Multi-column display
  • Preview of the selected file/directory
  • VIM-like console and hotkeys
  • File operations like create, copy, delete
  • File renames, even multiple files at once
  • Determining file types automatically
  • Suggesting correct programs for files
  • Change the directory of your shell after exiting Ranger

System Dependencies

  • Python 2.6 or Python 3.1 with ncurses module and (optionally) wide-Unicode support, Like UTF-8
  • file for determining file types
  • chardet (Python package) 
  • sudo to use the “run as root” feature
  • python-bidi (Python package) to display right-to-left file names correctly (Hebrew, Arabic)

Ways to Install Ranger on Linux Distributions:

Now, you are ready to install Ranger on your system. Since there are multiple distros of Linux, the process will be different for each of them.

Method 1. Install Ranger On Linux From Source

You can always compile Ranger from source, using the stable Ranger package available on Git. All you have to do is:

Step 1. Launch the Terminal using Ctrl+Alt+T.

Step 2. Update the repositories and install the necessary prerequisites.

sudo apt-get update
sudo apt-get install make git vim

Step 3. Now fetch the latest Ranger package from Git:

git clone https://github.com/hut/ranger.git

Step 4. After downloading the Ranger package, you have to navigate to the downloaded folder. Use the following command:

cd ranger

Step 5. Finally, run the following command to install Ranger.

sudo make install

Method 2. Using Linux Native Archives/Package Managers

You can also use the native repositories available with the Linux distributions to install Ranger. We have provided the commands for different distros:

On Debian-based Systems

These include distributions like Debian, Ubuntu, Linux Mint, etc. You can either use the typical APT repo or if you are running the latest version of Python (Python 3 or up) you can also use PyPi or PiP to install Ranger on Linux.

Solution 1. Using The APT Repository

Step 1. Start by updating the APT repo:

sudo apt update

Step 2. Now, install Ranger:

sudo apt install ranger
Solution 2. Using PyPI

NOTE: You can use this method for any distro, just ensure it is running Python 3. Then you can use PyPI to install Ranger.

Step 1. Start by installing Python pip if you do not have it on your system:

sudo apt install python3-pip

Step 2. Then, use pip to install Ranger:

sudo pip3 install ranger-fm

For Systems Running Fedora

Step 1. First, update the DNF repo:

sudo dnf update

Step 2. Now, install Ranger:

sudo dnf install ranger

On Arch Linux

There are again two solutions to installing Ranger on systems running Arch Linux:

Solution 1. Using the Pacman Repo

Step 1. Update the repository and install Ranger:

sudo pacman -Syu
sudo pacman -S ranger

Or, You can use the Aur repository:

Solutions 2. Using The Aur Repository

As mentioned earlier, you can also use AUR to install Ranger. But you will need an AUR helper, such as YAY:

Step 1. Start by installing YAY:

sudo pacman -S yay

Step 2. Then, use YAY to install Ranger.

yay -S ranger

On CentOS/RHEL:

Solution 1. Using YUM Repo

Step 1. Update the repo and install Ranger using YUM:

sudo yum update
sudo yum install ranger
Solution 2. Using EPEL Repo (RHEL)

NOTE: You can use EPEL on CentOS, just use YUM instead of DNF.

Step 1. Start by enabling the CodeReady Linux Builder repository.

sudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms

Step 2. Then, install the EPEL repo.

sudo dnf install \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

Step 3. Finally, install Ranger using EPEL:

sudo dnf install ranger

On Gentoo

Step 1. Update the Portage tree:

sudo emerge --sync

Step 2. Then, install Ranger:

sudo emerge -av ranger

For Systems Running Void Linux:

Step 1. Update the required repo and install Ranger:

sudo xbps-install -Syu
sudo xbps-install ranger

On OpenSUSE

Step 1. Run the following command:

sudo zypper install ranger

On Alpine Linux

Step 1. Use the following commands to update and install Ranger:

sudo apk update
sudo apk add ranger

Method 3. Install Ranger On Linux Via Snap

A Snap is basically an application containerized with all the necessary dependencies. Thus, it is a secure and scalable way to embed apps on any Linux system. So, you can install Ranger via Snap, all you have to do is:

Step 1. Check if you have Snap enabled:

sudo systemctl status snapd.service

Step 2. If not, enable it using the following command:

sudo systemctl enable --now snapd.service

Step 3. Then, install Ranger via Snap:

sudo snap install ranger

Method 4. Install Ranger Using Flatpak

Flatpak is essentially a framework that supports a sandbox environment for applications to run. Users can build, distribute, manage, and run most applications using Flatpak. All they have to do is:

Step 1. First, install Flatpak on your device.

sudo apt install flatpak

NOTE: You can use YUM/DNF/ZYPPER command based on the Linux Distro you are running. For this example, we are demonstrating on a Debian based device.

Step 2. Now, install Ranger:

flatpak install flathub org.ranger.Ranger
Gilbert John Avatar