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 is its 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:
sudo apt install nnn
On Arch Linux:
pacman -S nnn
To install nnn on Red Hat, CentOS, Fedora, or Rocky Linux:
sudo dnf install nnn
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.
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 can also use the arrow keys. To enter a directory, move right or press Enter. To go up a directory, press left.
Fortunately, you don't have to memorize the controls. You can 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.
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/plugins directory.
The plugins are mostly implemented as shell scripts. To run them you simply bind them to keys with the NNN_PLUG environment 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 the semicolon (;), 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:
export NNN_PLUG='l:launcher'
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 -P option, followed by the key for the plugin you want to run. You'll probably want to set this as a shell alias if 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 on the GitHub page and 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 and why 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.