$linuxjunkies
>

nnn(1)

nnn is a terminal file manager that navigates directories and manages files with a keyboard-centric interface.

UbuntuDebianFedoraArch

Synopsis

nnn [-bCdDeEfFgHhJkKpPqQrRsStTuUVwxX] [-a ASSOC] [-c N] [-l LEVEL] [-n NNN_TMPFILE] [-o NNN_OPENER] [-P key] [-e EDITOR] [DIR]

Description

nnn is a lightweight, full-featured terminal file manager that emphasizes speed and keyboard navigation. It displays files and directories in a single-column list, allowing you to quickly browse and manage the filesystem without leaving your terminal.

The interface supports multiple tabs, bookmarks, search, and file previews. You can open files with external programs, create archives, perform batch operations, and customize behavior through plugins and environment variables.

Common options

FlagWhat it does
-eOpen files in specified text editor (default: VISUAL or EDITOR env var)
-pStart in file picker mode (outputs selected file path on exit)
-PRun script/plugin with key binding; useful for custom actions
-dStart in detail view (shows file sizes, dates, and permissions)
-HShow hidden files by default
-tSort files by modification time (newest first)
-sSort files by size (largest first)
-rReverse sort order
-ADisable directory auto-open on single key navigation
-VPrint version and exit
-hPrint help message and exit

Examples

Open nnn file manager in current directory with default settings

nnn

Open nnn in Downloads folder and show hidden files

nnn -H ~/Downloads

Open nnn and use vim as the default editor for opening files

nnn -e vim

Start in detail view mode with files sorted by modification time

nnn -d -t

Run nnn in picker mode; selected file path is written to file on exit

nnn -p /tmp/nnn_selection

Open nnn in Documents folder, sorted by size in reverse (smallest first)

nnn -r -s /home/user/Documents

Browse /var/log directory with auto-open disabled for single-key navigation

nnn -A /var/log

Related commands