ranger is a beautifully designed console based file browser to boost your productivity. ranger shows the current and parent directories in multiple columns (panes), presenting a complete context of your current location. And don’t be scared by the project tagline mentioning vim, ranger supports very easy navigation using arrow keys.
Of course, having vim-like keybinds makes it a perfect companion for vim users. But that’s just the tip of the iceberg. ranger supports a lot of customization and the power to open every file type with the default desktop application you have assigned to the mime. Then there’s distinct highlighting for different mime types. So it’s as good as Nautilus sans the bulk and you can navigate and work much faster.
ranger is much more evolved than NcursesFM we visited earlier.
- multi-column display
- preview of the selected file/directory
- status bar with file/directory information
- common file operations (create/chmod/copy/delete/…)
- vim-like console and hotkeys
- renaming multiple files at once
- automatically determine file types and run them with correct programs
- change the directory of your shell after exiting ranger
- tabs, bookmarks, mouse support
- color schemes support
- true color image previews (needs w3mimgdisplay from w3m)
- video thumbnails (needs w3mimgdisplay from w3m)
To install ranger on Ubuntu, run:
$ sudo apt-get install ranger
If you are not very familiar with the command-line you should first check the man page of ranger. Run:
$ man ranger
and check the sections
Config files are in
~/.config/ranger/ which you can run through once.
To start ranger, run:
To open files with default desktop associations, add the following lines at the top (maximum priority at the top) in
has xdg-open, flag f = xdg-open "$1"
To open mkv files with smplayer, add (again, at the top to give more priority to
ext mkv = smplayer "$@"
And that’s just the beginning. There’s a lot more you can do with ranger.
This is unrelated to ranger, to open any file with default associated program from the terminal, run:
$xdg open file