How to Install and Use a TUI File Manager
Setting up a terminal-based file manager for navigating, previewing, and manipulating files entirely with the keyboard, without leaving the terminal.
A TUI file manager brings visual, navigable file browsing directly into the terminal — genuinely faster for many keyboard-oriented workflows than switching to a separate graphical file manager application.
Step 1: choose a TUI file manager
ranger — vim-inspired keybindings, built-in file previews
nnn — extremely lightweight and fast, plugin-extensible
lf — minimal, highly scriptable, written in Go
Each has a genuinely different philosophy — ranger prioritizes rich previews and vim-like navigation, nnn prioritizes raw speed and minimal resource usage, lf prioritizes scriptability and configuration simplicity.
Step 2: install your chosen file manager
# ranger
sudo apt install ranger # Debian/Ubuntu
brew install ranger # macOS
# nnn
sudo apt install nnn
brew install nnn
Step 3: launch it and learn the core navigation keys
j/k move down/up
h/l go up a directory / enter a directory
q quit
Most TUI file managers default to vim-style keybindings for navigation — consistent with the broader terminal tooling ecosystem’s general preference for keyboard-first, modal interaction.
Step 4: preview files without opening them in a separate application
ranger: automatically shows text file contents, image
previews (with the right terminal and dependencies),
and archive contents in a side pane
Built-in previews are one of the biggest practical advantages over a plain ls-based workflow — you can visually confirm a file’s contents before deciding to open, move, or delete it.
Step 5: perform standard file operations
ranger:
dd cut
yy copy
pp paste
dD delete
cw rename
These operate exactly like their vim editing-equivalent mnemonics (d for cut/delete, y for yank/copy, p for paste), a deliberate design choice making the keybindings easier to remember for anyone already familiar with vim.
Step 6: use bulk rename for renaming multiple files at once
ranger: select multiple files (Space), then press "bulkrename"
— opens your $EDITOR with a list of filenames to edit as text,
applying the renames when you save and close
Editing filenames as plain text in your normal editor, rather than renaming one file at a time through dialogs, is a genuinely efficient way to handle batch renames.
Step 7: navigate directly to a specific directory quickly
ranger: type a partial path, or use bookmarks (m to set,
' to jump to a bookmark)
nnn: type '/ then a search term for a built-in fuzzy jump
Step 8: integrate with the actual shell you’re using
# ranger can change your shell's actual working directory
# on exit via a shell function wrapper — check the specific
# tool's documentation for your shell
By default, a TUI file manager’s navigation only affects its own internal state — configuring shell integration so that quitting the file manager leaves your actual shell in the directory you navigated to is a commonly desired, well-documented setup step worth doing.
Why a TUI file manager is worth learning alongside plain shell commands
cd, ls, and mv remain the right tools for scripted, repeatable file operations — a TUI file manager’s real advantage is interactive, exploratory browsing: previewing unfamiliar files, visually confirming a directory’s contents before acting on them, and performing bulk operations more efficiently than issuing individual shell commands one at a time.
Where ranger specifically came from
ranger, one of the three tools this guide covers, was first released in 2009 by developer Roman Zimbelmann (GitHub handle hut) — its defining design choice, vim-style modal keybindings and a three-column Miller-column layout showing the parent directory, current directory, and a preview of the selected item side by side, has remained the project’s core identity across the roughly decade and a half since. That three-pane layout specifically is what makes ranger’s navigation feel distinct from nnn or lf’s more traditional single-pane approach, and it’s the reason ranger tends to appeal most to users already comfortable navigating in vim’s own modal style.
Customizing keybindings and behavior beyond the defaults
Each of these tools reads its own configuration file for customizing keybindings, colors, and startup behavior (~/.config/ranger/, ~/.config/nnn/, or ~/.config/lf/lfrc, depending on which you chose) — worth exploring once you’re comfortable with the defaults, particularly for remapping any keybinding that conflicts with muscle memory from a different tool you also use regularly. ranger’s configuration is Python, nnn favors compile-time and environment-variable options over a runtime config file, and lf’s configuration is its own small, purpose-built scripting language — genuinely different customization philosophies reflecting each tool’s own stated priorities.
Combining a TUI file manager with fzf for faster navigation
For jumping directly to a specific, remembered location rather than browsing step by step, pairing a TUI file manager with fzf — using fzf to fuzzy-jump to a directory, then launching the file manager already positioned there — combines fzf’s speed for known destinations with the file manager’s strength at open-ended, exploratory browsing once you’ve actually arrived.
A newer, faster fourth option worth knowing about: yazi
brew install yazi # macOS
cargo install --locked yazi-fs yazi-cli # via Rust's package manager
Yazi, written in Rust and built on fully asynchronous I/O, is the newest of the widely used TUI file managers, and it’s grown quickly since its initial release specifically because that async design lets it stay responsive — generating image and video previews, computing directory sizes — without blocking navigation the way a synchronous file manager can on a large or slow (particularly network-mounted) directory. It supports built-in image previews out of the box and a Lua-based plugin system for further extension, occupying a similar niche to ranger’s rich-preview philosophy but with a different, more modern performance profile. If ranger has ever felt sluggish on a large directory or over a slow remote filesystem, yazi is the first alternative worth trying specifically because that’s the exact problem its async architecture targets.
Related:
Sources: