Open In App

Ranger – A CLI File Manager

Last Updated : 18 Jul, 2021
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Ranger is a command Line-based file manager with VI key bindings for Linux. It provides almost all features of the GUI file manager into the terminal. It provides a minimalist and nice curses interface with a view of the directory hierarchy. File launcher of ranger is very good that automatically finding out which program to use for what file type. 

Features:

  • UTF-8 Support (if your Python copy supports it)
  • Multi-column display
  • Preview of the selected file/directory
  • Common file operations (create/chmod/copy/delete/…)
  • Renaming multiple files at once
  • VIM-like console and hotkeys
  • Automatically determine file types and run them with correct programs
  • Change the directory of your shell after exiting ranger
  • Tabs, bookmarks, mouse support…

Installation

Use the following command to download these dependencies:

For Ubuntu/Debian:

sudo apt-get install less python3

For Arch Linux:

sudo pacman -S less python3

Now let’s see how to install ranger on different Linux distros:

For Ubuntu/Debian:

sudo apt-get install ranger

For Fedora 22+:

sudo dnf install ranger

For CentOS/RHEL:

sudo yum install ranger

For Arch Linux:

sudo pacman -S ranger

Now to lunch the ranger use ranger command:

ranger

Here the first column shows the parent directory, the second column shows current directories and files and the third column shows the preview of the selected file in the second column.

For navigation, we can H, J, K, and L keys, and to open the selected file press ENTER key. And to quit from ranger use q key.

To enable the file preview of images and videos, we need to install some optional dependencies which are as follows:

  • w3mimgdisplay or ueberzug for image previews
  • ffmpegthumbnailer for video thumbnails
  • pdftoppm to preview of PDF

Use the following commands to install these decencies:

For Ubuntu/Debian:

sudo apt-get install ueberzug ffmpegthumbnailer  poppler-utils

For arch Linux:

sudo pacman -S  ueberzug ffmpegthumbnailer poppler

Now we can see the previews of images, videos and PDFs:

To know more about ranger, use the man command Like:

man ranger



Next Article

Similar Reads

Article Tags :
three90RightbarBannerImg
  翻译: