How to Install and Use a TUI File Manager
A complete walkthrough setting up a terminal-based file manager — navigating, previewing, and manipulating files entirely with the keyboard, without ever 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.