Guides Ranger: Console-Based File Management

Ranger: Console-Based File Management

Given my fondness for the console and for bare-bones window managers like
ratpoison, I’m always pleased when I find another neat console tool. This time it was Ranger (hat-tip to K.Mandla), an ncurses-based file manager.

The ncurses-based file manager Ranger is a console tool worth checking out and taking the time to learn.

Unfortunately, Ranger doesn’t seem to be available as a package for Debian or Ubuntu, but it can be downloaded and installed from the project page. It looks a little weird when you first run it; it took me a moment to work out which subdirectory my cursor was actually in. However, hitting the arrow keys a bit clarifies what’s going on.

Ranger screenshot
Ranger in Action

The second column from the right is the directory that you’re currently navigating within. You can use the arrow keys, or the hjkl keys (as with Vim) to move up and down within the directory, or to move left or right to a higher
or lower directory level. (Since it’s ncurses-based, you can also use the mouse.) The columns on the left show higher directory levels; the column on the right is a sneak peak at the contents of the currently highlighted subdirectory.

What I really like is that when you get to the final leaf of any directory tree — a file — you can then open that file. Text files open automatically in your preferred editor; If you try to open another file, Ranger will ask you for a program to use to open it.

Ranger can do a lot more than this — hit “?” for excellent online help that
summarizes what you can do with files and directories. “4?” gives you the various
file operations available, such as “:delete” to delete the highlighted file.
You can also mark a bunch of files with space, then delete them all.

Ranger is a neat option if you regularly use the console and would like a slightly more user-friendly option for file management than ls and the other shell builtins. I’ll certainly be using it again.

Juliet Kemp has been messing around with Linux systems, for financial reward and otherwise, for about a decade. She is also the author of “Linux System Administration Recipes: A Problem-Solution Approach” (Apress, 2009).

Follow ServerWatch on Twitter

Latest Posts

How to Convert a Physical Computer to a Virtual Machine

Many organizations are implementing virtualization technology into their networks to convert physical computers to virtual machines (VM). This helps reduce overall physical hardware costs,...

HPE ProLiant DL380 Gen10: Rack Server Overview and Insight

The HPE ProLiant DL380 series has consistently been a market leader in the server space. The Gen10 released in 2017 further increased HPE's market...

Best Server Management Software & Tools 2021

Finding the best server management software tools for your organization can have a major impact on the success of your business operations. Manually handling...

IBM AS/400: Lasting the Test of Time

Some server operating systems (OS) were built to survive the test of time – the IBM AS/400 is one such system.  The AS/400 (Application System/400)...

What is Disaster Recovery?

The modern organization's heavy dependence on using data to drive their business has made having a Disaster Recovery (DR) plan in place a necessity....

Related Stories