Previous Page
PCLinuxOS Magazine
Article List
Next Page

nnn: The Terminal Based File Manager You Never Knew You Needed

by Paul Arnote (parnote)


Just like most people around these parts, I was a DOS and Windows user. It was a time before I even heard of Linux, much less tried it. Early Windows users -- I'm talking about Windows 3.1 and Windows for Workgroups 3.11 -- spent an equal amount of time in DOS as they did in Windows. Back then, Windows ran on top of DOS, so knowledge of the DOS command prompt was pretty much a requirement.

One program that I **always** installed on my DOS systems was Vernon D. Buerg's excellent LIST program. It was a simple file manager for the DOS command prompt that mostly did one thing, and did it well: it listed files in the selected directory. It also allowed users to view the contents of the selected file. Simply highlight the file and press the "Enter" key. The contents of that selected file -- whether it was a simple *.txt file or a binary file -- was opened in a simple viewer. The user could view the contents of the selected file. When a user was finished viewing the contents of a file, hitting the "Escape" key brought the user back to the listing of files. List was small, efficient, and pretty much stayed "out of the way," allowing users to navigate and work quickly.

Vernon D. Buerg's program running in DOS

This was useful, especially at a time when common file formats (like for games) were given obscure file extensions to "hide" their true nature. For example, MOD files used as sound or music files in games were often changed to have a file extension of MUS or MSC. Highlighting and taking a peek inside those files with the file viewer in List would reveal the true nature of the "file with the funky extension." Then, users could just copy the file and change the file extension to the more standard file extension, enabling playback with MOD file players of the day.

List also allowed users to perform basic file "housekeeping" duties, such as moving or copying files. The program had attracted a very loyal and faithful following of devout users over the years.

Buerg, who lived in the San Francisco area, died in 2009 at the age of 62. His List program was one of the early "shareware" success stories. Created for DOS, List was a 16-bit program. Before his death, users inquired about him updating List to 32-bit and 64-bit. However, Buerg stated that he had no interest in updating it, and he never did. Faithful users wanted to be able to use it on later versions of Windows at the command prompt, and the 16-bit version no longer ran on the later versions of Windows.

So, with Buerg declining to make a 32-bit or 64-bit version of List, Clark Woodworth of Weston, MA set out to create a List-type program that had the same/similar features, and that was 32-bit and 64-bit. He calls his version ZBLIST. Woodworth's program is an EXE, while List is a COM. Otherwise, they do appear to be rather similar. Woodworth has even created some short documentation for his new version.

Woodworth's ZBLIST.EXE running

So, you're probably thinking "enough with all the background material." I mention it because it is important and germain to the rest of our discussion. For as good as List is, there is NOTHING in any other OS that perfectly duplicates List, or that has all of List's features. Mysteriously, nothing in Linux, MacOS, Windows or any other OS has ever duplicated List's capabilities and features. Nothing.

On Linux, the closest we can come is an obscure file tool with the very strange name of "nnn". Fortunately, nnn is in the PCLinuxOS repository, so installation is straightforward and just as you would install anything else on your computer.

Once installed on your computer, entering nnn -h at a command line prompt in a terminal session will list all of the command line options. Entering just nnn at the command line prompt will launch nnn in the current working directory. If you want nnn to open to a specific directory, cd to the directory you want to view first. Alternatively, type nnn, followed by any options you want/need to invoke, and then the path to the directory you want to start in.

Here are the command line startup options for nnn:

Of course, that last line in the list of command line startup options for nnn is the "home" of nnn.

Navigation in nnn is pretty straight forward. You move about the screen by using the arrow cursor keys, or the Page Up/Page Down keys. To change the directory you're viewing, highlight the directory you want to view, and hit the "Enter" key or the right cursor key. Similarly, if you highlight a file and hit the "Enter" key or the right cursor key, the file will be opened in the default application associated with that file. For example, plain text files on my computer (running Xfce) are associated with Mousepad, so all plain text files automatically open in Mousepad on my computer. Similarly, GPicView is my default image viewer, so all pictures open with it. Videos open with VLC.

To select files, highlight them and press the spacebar. A "+" sign will appear next to selected files. Then, you can move the files by using Ctrl + V, copy the files by using Ctrl + P, or delete the selected files by using Shift + X. If you want to create an archive file out of the selected files, press the "f" key (lower case). It will ask you if you want to create an archive out of the current file, or the selection of files. Choose "s" for the selection of files, and then enter the name of the archive you want to create, complete with the archive file extension to determine the type of archive.

To toggle seeing all hidden files, press the "." key. To toggle between a simple list view and a detailed view of the files, press the "d" key. To batch rename files, press the "r" key (lower case) and follow the prompts.

You can get some navigation assistance at any time by pressing the "?" key. When you do, the information below will be displayed:

As always, you can quit nnn simply by pressing the "q" key. You can also view the nnn man page here.

Interestingly, nnn also supports plugins that allow various file types to be displayed right in the terminal window. There are 60 plugins on the nnn github site. You can also create your own plugins using any scripting language you desire. You can download the plugins from the nnn github site, but be sure to put them in your ~/.config/nnn/plugins directory.


nnn is fast, efficient, and quite small. It does a good job of not getting into its own way, allowing the end user to quickly dispatch file duties. Yes, it is a bit awkward at first, but with repeated use, the tasks become easier and easier, until they are second nature.

Just as using List under DOS made my life with DOS and all of its shortcomings better, nnn has the potential to make my life at the Linux command prompt easier. If you give it a chance, I bet you just might agree.

Previous Page              Top              Next Page