The Linux ranger is a file manager that works in a terminal window and provides a smooth way to view and edit files. Credit: Leighton Ramos For those of us who cut our technical teeth on the Unix/Linux command line, the relatively new ranger makes examining files a very different experience. A file manager that works inside a terminal window, ranger provides useful information and makes it very easy to move into directories, view file content or jump into an editor to make changes. Unlike most file managers that work on the desktop but leave you to the whims of ls, cat and more to get a solid handle on files and contents, ranger provides a very nice mix of file listing and contents displays with an easy way to start editing. In fact, among some Linux users, ranger has become very popular. As you start ranger, you will see a display that looks something like this: shs@stinkbug /home/shs/bin shs bin 5 case1 Desktop 0 killit Documents 11 prime Music 0 sieve Pictures 0 tryme Public 0 Reports 8 Templates 0 Videos 0 examples.desktop 8.77 K servers drwxrwxr-x 2 shs shs 5 2018-0206 17:28 14.2K sum, 63G free 1/11 All The first line shows the user and system, plus the directory that has its contents listed on the right. The columns in the display show the current directory (shs), the subdirectories and files (bin, Desktop, etc.), the number of files within each directory or the file size (if it’s a file), the contents of the currently selected directory or the content of the currently selected file. shs@stinkbug /home/shs/bin shs / bin 5 case1 / Desktop 0 killit / Documents 11 prime files in bin / Music 0 sieve / dirs Pictures 0 tryme / Public 0 Reports 8 Templates 0 Videos 0 examples.desktop 8.77 K servers 61 B drwxrwxr-x 2 shs shs 5 2018-0206 17:28 14.2K sum, 63G free 1/11 All How to move around ranger Moving around in ranger is easy and quickly becomes second nature. q quit => (right arrow) moves down a directory return — if current selection is a directory, opens the directory return — if current selection is a file, opens the file for editing The line at the bottom of the display is essentially the long listing of the file or directory, displaying the permissions, owner and group, date and time, size, etc. — typical long listing details. Ranger will use your EDITOR setting to determine what editor to use when you go to edit a file. The editor that is invoked depends on your account settings. Change your settings with a command like this, and it will use vi. VISUAL=vi; export VISUAL EDITOR=vi; export EDITOR Ranger works with a series of optional config files. To load them, you would start ranger as shown below. It will set up your configuration files in a ~/.config/ranger directory. $ ranger --copy-config=all creating: /home/shs/.config/ranger/rifle.conf creating: /home/shs/.config/ranger/commands.py creating: /home/shs/.config/ranger/commands_full.py creating: /home/shs/.config/ranger/rc.conf creating: /home/shs/.config/ranger/scope.sh Ranger is written in python and is an extremely clever tool for quick file browsing with little effort. It’s an easy-to-use file manager for both command line newbies and experienced Unix pros. It was developed by Roman Zimbelmann and is licensed under the terms of the GNU General Public License. Related content how-to How to find files on Linux There are many options you can use to find files on Linux, including searching by file name (or partial name), age, owner, group, size, type and inode number. By Sandra Henry Stocker Jun 24, 2024 8 mins Linux opinion Linux in your car: Red Hat’s milestone collaboration with exida With contributions from Red Hat and critical collaborators, the safety and security of automotive vehicles has reached a new level of reliability. By Sandra Henry Stocker Jun 17, 2024 5 mins Linux how-to How to print from the Linux command line: double-sided, landscape and more There's a lot more to printing from the Linux command line than the lp command. Check out some of the many available options. By Sandra Henry Stocker Jun 11, 2024 6 mins Linux how-to Converting between uppercase and lowercase on the Linux command line Converting text between uppercase and lowercase can be very tedious, especially when you want to avoid inadvertent misspellings. Fortunately, Linux provides a handful of commands that can make the job very easy. By Sandra Henry Stocker Jun 07, 2024 5 mins Linux PODCASTS VIDEOS RESOURCES EVENTS NEWSLETTERS Newsletter Promo Module Test Description for newsletter promo module. Please enter a valid email address Subscribe