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 <= (left arrow) moves up 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 examine files on Linux Linux provides very useful options for viewing file attributes, such as owners and permissions, as well as file content. By Sandra Henry Stocker Oct 24, 2024 6 mins Linux how-to 8 easy ways to reuse commands on Linux Typing the same command again and again can become tiresome. Here are a number of ways you can make repeating commands – or repeating commands but with some changes – a lot easier than you might expect. By Sandra Henry-Stocker Oct 15, 2024 5 mins Linux news SUSE Edge upgrade targets Kubernetes and Linux at the edge SUSE Edge 3.1 includes a new stack validation framework and an image builder tool that are aimed at improving the scalability and manageability of complex Kubernetes and Linux edge-computing deployments. By Sean Michael Kerner Oct 15, 2024 6 mins Edge Computing Linux Network Management Software how-to Lesser-known xargs command is a versatile time saver Boost your Linux command line options and simplify your work with xargs, a handy tool for a number of data manipulation tasks. By Sandra Henry Stocker Oct 11, 2024 6 mins Linux PODCASTS VIDEOS RESOURCES EVENTS NEWSLETTERS Newsletter Promo Module Test Description for newsletter promo module. Please enter a valid email address Subscribe