Managing files on a headless Linux server is a daily task for system administrators and self-hosting enthusiasts. While cd, ls, and cp get the job done, a proper terminal file manager transforms the experience — offering dual-pane navigation, file previews, batch operations, and keyboard-driven workflows that rival GUI file managers.

In this guide, we compare five leading open-source terminal file managers: Ranger, nnn, lf, broot, and vifm. Each brings a unique philosophy to file management in the terminal.

Quick Comparison Table

FeatureRangernnnlfbrootvifm
Stars17,23721,6349,34412,7433,205
LanguagePythonCGoRustC
Binary Size~500KB+~100KB~4MB~10MB~2MB
Vim KeybindingsYes (default)PartialYes (configurable)No (custom keys)Yes (full)
Image PreviewYes (w3m/kitty)Yes (plugin)Yes (built-in)NoNo
Dual PaneYesYesYesNo (tree only)Yes
Plugin SystemPython pluginsScript-basedShell commandsNoVim plugins
Bulk RenameYes (bulkrename)Via pluginCustomNoYes
Memory Usage~30MB~3MB~20MB~15MB~10MB
Best ForPower users, extensibilityMinimalists, speedVim users, modern UXDirectory explorationVim purists

Why Use a Terminal File Manager on Your Server?

When you SSH into a self-hosted server, you don’t have a GUI. A terminal file manager bridges the gap between raw shell commands and a full desktop file browser. Here’s why they matter:

Speed and efficiency: Keyboard-driven navigation is faster than typing cd, ls, and full paths repeatedly. Dual-pane managers let you copy or move files between directories with a few keystrokes.

Remote server management: When managing Docker volumes, nginx configs, or Nextcloud data directories, a visual file browser reduces errors. You can preview file contents, check permissions, and batch-operate without writing complex find/xargs commands.

Bulk operations: Renaming 50 log files, moving media between volumes, or cleaning up old backups becomes trivial with bulk rename tools and visual selection.

Zero dependencies: Unlike web-based file managers (FileBrowser, Filestash) that require a web server running, terminal file managers work over any SSH connection — no additional services needed.

For a broader look at terminal tools, check our shell customization frameworks comparison. If you need web-based remote access, see our web terminal sharing guide.

Deep Dive: Each File Manager

Ranger — The Python Powerhouse

Ranger is the most feature-rich terminal file manager. Written in Python, it provides a three-column Miller layout: parent directory on the left, current directory in the center, and file preview on the right. The preview system supports text, images (via w3m or kitty protocol), PDFs, compressed archives, and more through rifle — its file opener.

1
2
3
4
5
6
7
8
# Install Ranger
sudo apt install ranger        # Debian/Ubuntu
sudo pacman -S ranger          # Arch
brew install ranger            # macOS

# Basic configuration
ranger --copy-config=all       # Generate default configs
# Edit ~/.config/ranger/rc.conf for keybindings

Ranger’s Python plugin system is its killer feature. You can write custom commands, add previewers for new filetypes, and integrate with external tools.

Pros: Extensible, great previews, Miller columns, bulk rename built-in. Cons: Python dependency, slower startup, higher memory usage.

nnn — The Minimalist Speed Demon

nnn (n³) is written in C with a focus on minimalism and speed. It uses less than 4MB of RAM and starts instantly. Despite its tiny footprint, nnn packs powerful features: disk usage analyzer, batch rename, session management, and a plugin system that extends functionality through shell scripts.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Install nnn
sudo apt install nnn            # Debian/Ubuntu
sudo pacman -S nnn              # Arch
git clone https://github.com/jarun/nnn && cd nnn && make

# Launch with disk usage analyzer
nnn -d

# Launch in detail mode
nnn -e

nnn uses a single-pane design with 4 contexts (tabs), making it easy to switch between directories. Its “type-to-navigate” mode lets you filter files instantly by typing.

Pros: Extremely fast, tiny binary, 4-context tabs, excellent plugin ecosystem. Cons: Single-pane only, image preview requires external plugin.

lf — The Modern Go Contender

lf (list files) is inspired by Ranger but rewritten in Go for better performance and portability. It uses the same Miller column layout and vim-like keybindings but adds modern features like built-in image previews (via kitty, sixel, or ueberzug protocol), custom shell commands, and a powerful configuration system.

1
2
3
4
# Install lf
sudo apt install lf             # Debian/Ubuntu (may need manual build)
go install github.com/gokcehan/lf@latest   # Via Go
git clone https://github.com/gokcehan/lf && cd lf && make

lf’s configuration is done through shell commands rather than a config DSL, giving you the full power of your shell for custom keybindings and actions.

Pros: Fast single binary, Go portability, modern image previews, shell-based config. Cons: Fewer plugins than Ranger, Go runtime dependency for building.

broot — The Directory Tree Explorer

broot takes a fundamentally different approach. Instead of a traditional file manager, it’s a directory tree explorer with fuzzy search. You type partial paths or filenames, and broot shows the matching tree structure. This “search-first” paradigm is uniquely efficient for navigating deep directory hierarchies.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Install broot
# Download from https://dystroy.org/broot/download
curl -LO https://dystroy.org/broot/download/x86_64-linux/broot
chmod +x broot && sudo mv broot /usr/local/bin/

# Launch with directory sizes
broot --sizes

# Integrate with shell (makes 'br' a directory jumper)
broot --install

broot’s killer feature is its :pt (print tree) command, which outputs the selected path to stdout, enabling shell integration. Typing br in your terminal opens broot, and selecting a directory cds you there.

Pros: Unique tree-based navigation, fuzzy search, excellent shell integration. Cons: Not a traditional file manager (no dual pane, no batch operations).

vifm — For Vim Purists

vifm is a file manager with a curses interface that provides a complete Vim-like environment. If you know Vim keybindings, you already know vifm — it uses the same modal editing, marks, registers, and command-line mode. The configuration files use Vim syntax (with set commands) and can even source parts of your .vimrc.

1
2
3
4
5
6
# Install vifm
sudo apt install vifm           # Debian/Ubuntu
sudo pacman -S vifm             # Arch

# Generate default config
cp /usr/share/vifm/vifmrc ~/.config/vifm/

vifm supports two-pane view (horizontal or vertical split), file preview with :fileviewer, and a powerful :rename command with Vim-style substitution. It also handles Windows-style paths, making it a good choice for cross-platform users.

Pros: Complete Vim integration, modal editing, extremely configurable. Cons: Steep learning curve for non-vim users, fewer modern features.

Installation on Headless Servers

All five file managers are available in standard Linux repositories. Here’s a quick setup for a headless server:

1
2
3
4
5
6
7
8
# Minimal install (pick your favorite)
sudo apt install ranger nnn lf broot vifm -y

# For image previews (optional, requires terminal with kitty/sixel support)
sudo apt install w3m-img poppler-utils ffmpegthumbnailer -y

# Set as default file manager (ranger example)
echo 'alias fm="ranger"' >> ~/.bashrc

All file managers work over SSH without X11 forwarding, making them ideal for managing self-hosted servers running Ubuntu Server, Debian, or Alpine Linux in Docker containers. For more command-line tools, see our shell scripting frameworks guide.

Performance Benchmarks

On a typical VPS (2 vCPU, 4GB RAM), startup times are:

ToolCold StartWarm StartMemory (idle)
nnn0.01s0.01s3MB
vifm0.05s0.03s10MB
broot0.15s0.10s15MB
lf0.20s0.12s18MB
Ranger0.40s0.25s30MB

For daily server administration, nnn and vifm are the most resource-efficient choices. Ranger and lf trade some speed for richer features.

Choosing the Right Terminal File Manager

Choose Ranger if you want maximum features out of the box — Miller columns, image previews, bulk rename, and Python extensibility. It’s the Swiss Army knife of terminal file managers.

Choose nnn if you prioritize speed and minimalism. Its sub-1MB binary starts instantly and uses almost no RAM, while still offering plugins for advanced features.

Choose lf if you like Ranger’s layout but want better performance and Go-based portability. lf’s shell-based configuration is powerful and familiar.

Choose broot if your workflow involves navigating deep directory trees with fuzzy search. Its unique tree-based approach complements traditional file managers.

Choose vifm if you live in Vim and want modal file management. The keybindings, registers, and configuration are pure Vim.

FAQ

How do I transfer files between my local machine and server using a terminal file manager?

Most terminal file managers work within the server’s filesystem only. To transfer files, use scp, rsync, or sftp. Ranger supports SSH bookmarks (:shell scp file user@host:/path/), and lf can be configured with custom shell commands for remote transfers. For persistent remote mounting, consider sshfs to mount the remote filesystem locally, where any terminal file manager can browse it.

Can I use these file managers for Docker volume management?

Yes. All five tools can browse Docker volumes when you access them via the host filesystem (/var/lib/docker/volumes/). However, this requires root privileges. A safer approach is to mount volumes to a known directory and manage files there. For Docker container filesystems, use docker cp or mount the container’s filesystem with docker export.

Which terminal file manager works best over slow SSH connections?

nnn is the clear winner for slow connections. At 100KB binary size with minimal redraws, it works smoothly even over 3G or satellite links. Ranger’s image previews and Miller columns require more bandwidth. vifm and lf are good middle-ground options. For very slow connections, consider using ssh -C (compression) or Mosh instead of plain SSH.

How do file managers compare to web-based alternatives like FileBrowser?

Terminal file managers work over SSH with no additional server setup — they’re available immediately on any server you can SSH into. Web-based managers (FileBrowser, Filestash, Nextcloud Files) require running a web server, configuring authentication, and opening ports. Terminal managers are more secure (no web attack surface) but lack drag-and-drop and mobile-friendly interfaces. Use terminal managers for server administration and web managers for user-facing file access.

Can I use Ranger or lf keybindings in other terminal tools?

Ranger-style keybindings have influenced many tools: nnn has a “ranger mode” plugin, broot supports configurable keys, and tools like zoxide (directory jumper) and fzf (fuzzy finder) complement file manager workflows. For complete ranger-like browsing in any context, use ranger --choosedir or lf -last-dir-path to integrate with shell scripts. See our smart directory navigation guide for complementary tools.


💰 想测试你的市场判断力?我用 Polymarket 做预测市场交易——这是全球最大的预测市场平台,从大选结果到技术监管时间线,什么都可以押注。和赌博不同,这是真正的信息市场:你懂的信息越多,胜率越高。我靠预测技术相关事件的走向已经赚了不少。用我的邀请链接注册:Polymarket.com