nnn: A Powerful, Terminal-Based File Manager for Linux Power Users

There are a lot of terminal-based programs that cater to power users on Linux, and the file manager nnn is one of them. It’s a deceptively simple-looking but extremely configurable program. Here’s how to install and use it.

What Is nnn?

nnn is a file manager for Unix-like systems, including Linux, macOS, and Windows under WSL. The project is led by Arun Prakash Jana. The main hub for the project isits GitHub page, where you can also download the source code.

Installing nnn on Linux

Installing nnn is simple enough. You can just use your distribution’s package manager.

For example, on Debian or Ubuntu:

4

On Arch Linux:

To install nnn on Red Hat, CentOS, Fedora, or Rocky Linux:

MacBook and a Dell laptop running ZorinOS next to each other

Managing Files on Linux With nnn

To start nnn, simply type “nnn” at the shell. You can navigate the filesystem with the arrow keys or using Vim keys.

You don’t have to memorize the commands. You can press “?” to view the help screen. This will show you all the keybindings for nnn.

firefox logo with yellow warning symbol

You can switch among four “contexts” of nnn. They’re similar to browser tabs. You can go to one directory in one context while selecting a different directory in another. You could copy a file from one place to another.

The keyboard commands to move around are based on Vim: “h” for left, “j” for down, “k” for up, and “l” for right. you could also use the arrow keys. To enter a directory, move right or pressEnter. To go up a directory, press left.

Dell monitor showing Windows 10 desktop

Fortunately, you don’t have to memorize the controls. you may see the key bindings at any time by pressing “?”.

You can search within listings by pressing “/”. This is useful if you’re in a directory with a lot of files.

Woman in front of filing cabinet

nnn Plugins

Like a lot of Linux programs aimed at power users, nnn comes with a plugin system that lets you customize it to your preferences.

It’s easy to set up nnn plugins. There’s already a collection of them installed in the~/.config/nnn/pluginsdirectory.

The plugins are mostly implemented as shell scripts. To run them you simply bind them to keys with the NNN_PLUGenvironment variable. You would put this in the shell startup file, such as .bashrc for Bash or .zsh for Zsh.

To call the plugins, you press thesemicolon(;), followed by the key you bound the plugin to when you run NNN.

For example, to invoke the launcher plugin, you’d set it up with NNN_PLUG:

When you press the semicolon (;), followed by lowercase L (l), you’ll open the launcher that you can use to search and launch apps, even GUI apps.

To run a plugin on startup, start nnn with the-Poption, followed by the key for the plugin you want to run. You’ll probably want toset this as a shell aliasif you want to do so frequently.

What can you do with nnn plugins? Lots of things.

Do you like to listen to music while you work? You can have nnn play random songs with boom.

A lot of these plugins have dependencies you might have to install before using them. They’re listed onthe GitHub pageand many can be installed through your distro’s package manager.

The extensive list of programs shows that the terminal still has a hold on the imagination of serious Linux users andwhy Linux is such a favorite of techies. The list of plugins will only grow as more developers come up with their own extensions. It seems already that the functionality of nnn is only limited by your imagination.

A Powerful Terminal-Based File Manager

There is no shortage of tools to manage files on Linux. nnn, with its customizability through plugins, will become a Linux power user’s tool of choice.

Linux file systems overall are complex, and the choice of the file system is a subtle but important one that will affect how the system behaves under the hood. Two of the biggest ones are ext4 and Btrfs.

Not sure which Linux file system to choose? These days, the smart choice is btrfs versus ext4… but which one should YOU use?

Tor spoiled me forever.

I plugged random USB devices into my phone and was pleasantly surprised by how many actually worked.

It’s not super flashy, but it can help to keep your computer up and running.

Your phone is a better editor than you give it credit for.

You’ve been quoting these famous films wrong all along!

Technology Explained

PC & Mobile