NNN is an excellent terminal-based file manager for Linux. It’s incredibly lightweight and a hit in the Linux community because it’s easy to use. In this guide, we’ll show you how to navigate the Linux filesystem with NNN.
Install NNN on Linux
Before we can show you have to navigate the Linux filesystem with the NNN file manager, we must demonstrate how to install the program. Installing NNN on Linux is very simple. To start the process, launch a terminal window.
Once the terminal window is open and ready to go, follow the command-line installation instructions outlined below that corresponds with the Linux operating system you currently use. NNN is installable on Ubuntu, Debian, Arch Linux, Fedora, OpenSUSE, and others.
Ever since Ubuntu 18.04, the NNN file manager has been available for easy installation to Ubuntu users. To install the software on your Ubuntu system, make use of the Apt command below.
Note: you may need to enable the “Universe” software repository in your Ubuntu system if the command below doesn’t work.
sudo apt install nnn
On Debian, the NNN file manager is available to users via the “Main” software repository. To start the installation process for your Debian system, make use of the following command below.
Keep in mind that the version of NNN on Debian may be a little far behind in terms of updates than other operating systems due to how Debian releases software updates. If you’d like a more up-to-date version of NNN, consider installing Debian Backports.
sudo apt-get install nnn
The NNN file manager is available to Arch Linux users via the “Community” software repository. To get this app set up on your system, you must first enable the “Community” software repository in
/etc/Pacman.conf. Once you’ve done that, you will be able to install the app with the following command.
sudo pacman -S nnn
On Fedora Linux, the NNN file manager is available through the “Fedora” repositories on all architectures (including Fedora Server). If you’re using Fedora and want to use the NNN file manager on your computer, you can get it working using the following dnf command below.
sudo dnf install nnn
The NNN file manager is available to OpenSUSE Tumbleweed users and OpenSUSE LEAP users (15.1 and 15.2). The app is in the “OpenSUSE Oss” software repository. To start the installation, ensure you have this repo set up. Then, enter the following zypper command.
sudo zypper install nnn
Navigate the Linux filesystem with NNN
NNN is pretty easy to understand, as everything is done at the command level. For example, if you want to use NNN to view the “Documents” folder, you can run the nnn ~/Documents command, and it’ll load it up.
If you want to go back a folder in NNN, for example (up one level from the “Documents” folder), you’d press the h button on the keyboard. On the other hand, to go down one level (into a folder), you can select the directory using Up / Down keys on the keyboard and press Enter to access the folder.
You can also access files directly in NNN by selecting them using Up / Down keys and pressing the Enter key. To close the NNN session altogether, press q on the keyboard.
The basic information we went over in the previous section is more than enough to get around in NNN as an average user. However, if you have more advanced needs, you’ll want to know all the keybinds. Look below for a complete list of keybinds.
Note: you can also access the navigation info by pressing Shift + ? in NNN.
Up k Up PgUp ^U Scroll up
Dn j Down PgDn ^D Scroll down
Lt h Parent ~ ` @ – HOME, /, start, last
Ret Rt l Open ‘ First file/match
g ^A Top . Toggle hidden
G ^E End + Toggle auto-advance
b ^/ Bookmark key , Mark CWD
1-4 Context 1-4 (Sh)Tab Cycle context
Esc Send to FIFO ^L Redraw
Q Pick/err, quit ^G QuitCD
q Quit context 2Esc ^Q Quit
? Help, conf
FILTER & PROMPT
/ Filter Alt+Esc Clear filter & redraw
Esc Exit prompt ^L Clear prompt/last filter
^N Toggle type-to-nav
o ^O Open with n Create new/link
f ^F File details d Detail mode toggle
^R Rename/dup r Batch rename
z Archive e Edit file
* Toggle exe > Export list
Space ^J (Un)select m ^Space Mark range/clear sel
p ^P Copy sel here a Select all
v ^V Move sel here w ^W Cp/mv sel as
x ^X Delete E Edit sel
Alt ; Select plugin = Launch app
! ^] Shell ] Cmd prompt
c Connect remote u Unmount remote/archive
t ^T Sort toggles s Manage session
T Set time type 0 Lock
For more information on the NNN terminal-based file manager, take a look at the manual entry. To do that, run the man nnn command in a terminal window. The manual entry has a complete list of everything you need to know about Linux’s NNN file manager.