Ranger is a command line-based file manager with VI key bindings. It provides a minimalistic and nice curses interface with a view on the directory hierarchy. In this tutorial, we'll walk through the process of installing and configuring Ranger on Debian, Ubuntu and CentOS.
Installing Ranger
Before installing Ranger, you must first install make, git and vim. The former two will be needed for installation, and vim is necessary for Ranger to open as a text editor.
CentOS/Fedora/RHEL:
sudo yum update -y
sudo yum install make git vim -yUbuntu/Debian:
sudo apt-get update -y
sudo apt-get install make git vim -yTo install Ranger manually, you will need to download the latest Ranger repository from Github:
git clone https://github.com/hut/ranger.gitBuild and install Ranger:
cd ranger
sudo make installConfiguring Ranger
Run Ranger for a moment:
rangerExit with Shift + Q. This will allow Ranger to create its default configuration directory in ~/.config/ranger
Now copy the generated configuration files with the following command:
ranger --copy-config=allThe output will look something like this:
creating: /home/user1/.config/ranger/apps.py
creating: /home/user1/.config/ranger/commands.py
creating: /home/user1/.config/ranger/rc.conf
creating: /home/user1/.config/ranger/options.py
creating: /home/user1/.config/ranger/scope.shStart Ranger:
rangerAfter starting it, the first thing you will notice is a window layout, the left column shows the parent directory, the middle column the content and selection of the current directory and the right column child directories and files or a preview of the currently selected file.