# nnn — n³ The Fastest Terminal File Manager Ever Written > nnn is a full-featured, ultra-fast, zero-config terminal file manager written in C, with a plugin ecosystem, type-to-nav, mounting, disk usage analysis, and batch renaming. ## Install Save as a script file and run: # nnn — n³ The Fastest Terminal File Manager Ever Written ## Quick Use ```bash brew install nnn # Launch with detail mode + git status nnn -de # Auto-cd on quit n() { export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd" nnn "$@" [ -f "$NNN_TMPFILE" ] && . "$NNN_TMPFILE" && rm -f "$NNN_TMPFILE" } ``` ## Introduction nnn (n-cubed) is a blazing-fast, text-mode file manager that renders in under 16ms, fits in ~300KB, and leverages native OS shells for operations. Unlike heavier TUIs that ship their own mini-shell, nnn trusts your `cp`, `mv`, `trash-cli` and stays out of the way. A thriving plugin repo bolts on previews, git, archivers, and media. ## What nnn Does - Navigates filesystems with vim-style keys. - Displays disk usage, permissions, git status, mount points. - Mounts/unmounts archives, cloud drives (via rclone), remote shells. - Batch-renames via `$EDITOR`. - Plugin system: press `;` or `!` and pick a shell script. ## Architecture Overview nnn is a single C binary using ncurses. Operations delegate to POSIX tools over `fork/exec`. A context ring (up to 8 contexts) keeps multiple directories active. The plugin bridge writes a FIFO with selections so plugins can pipe selections into tools like `rsync`, `zip`, or `ffmpeg`. ## Self-Hosting & Configuration - Install via brew, apt, dnf, pacman, pkg. - Config via env vars: `NNN_PLUG`, `NNN_OPENER`, `NNN_FIFO`, `NNN_COLORS`. - Plugin installer: `curl -Ls https://raw.githubusercontent.com/jarun/nnn/master/plugins/getplugs | sh`. - `NNN_BMS="d:~/dev;s:~/sync"` bookmarks. - `NNN_TRASH=1` uses trash-cli for recoverable deletes. ## Key Features - Sub-100ms startup. - Context tabs — 8 directories, one keystroke apart. - Mount archives & cloud remotes inline. - Detail mode shows size, mtime, perms, git. - Plugin ecosystem for preview, batch ops, media. ## Comparison with Similar Tools - **ranger** — Python, more features, slower startup. - **lf** — Go, minimal, config in a DSL; very close to nnn. - **vifm** — vim-like bindings; heavier. - **mc (Midnight Commander)** — classic two-pane; not as fast. - **yazi** — newer Rust alternative with async previews. ## FAQ **Q: Is there image preview?** A: Via plugin with kitty/iterm2/Ueberzug. **Q: Tab/context difference?** A: Contexts are persistent tabs, preserved across sessions. **Q: Where do settings live?** A: Env vars in shell rc; no config file by design. **Q: Trash?** A: `NNN_TRASH=1` (trash-cli) or `2` (gio trash). ## Sources - https://github.com/jarun/nnn --- Source: https://tokrepo.com/en/workflows/43de3496-38c4-11f1-9bc6-00163e2b0d79 Author: Script Depot