Four Terminal File Managers for Linux: MC, Ranger, nnn and Yazi for SSH, Containers & Automation

When the GUI isn’t available: four terminal-based Linux file managers worth trying

Sometimes the terminal is simply the most practical way to manage files — whether you’re fixing a headless server over SSH, working inside a container, or just prefer a keyboard-first workflow that keeps you inside tmux. Terminal file managers save context switching, make batch operations fast, and can be scripted or embedded in automation. Below are four solid, free and open-source options that cover the spectrum from GUI-like to delightfully minimal.

“MC is the closest you’ll get to a GUI experience inside the terminal.”

Quick recommendation guide

  • Midnight Commander (MC) — GUI-like dual-pane, best for admins who want predictable keyboard or mouse-driven workflows and remote FTP/SFTP access.
  • Ranger — Vim-style, three-column layout; ideal for users who live in modal keybindings and want fast previews and extensibility.
  • nnn — Single-column, ultra-lightweight; pick this when startup time, memory, and raw speed matter.
  • Yazi — Modern, Rust-based; attractive if you want a polished UI and terminal image previews (only if your terminal supports inline graphics).

Why terminal file managers still matter for business

They reduce context switching for engineers and SREs who spend their days in SSH. They’re scriptable and low-footprint, making them suitable for containers, CI/CD runners, and minimal VMs. For teams that standardize on terminal-first workflows, adopting one file manager across the board can save minutes per task and reduce accidental GUI-heavy tooling in automation pipelines.

Midnight Commander (MC) — the terminal GUI replacement

What it is: A long-standing dual-pane file manager that brings many GUI concepts into the terminal: menus, panels, and an approachable set of hotkeys.

  • Pros: Dual-pane copy/move, batch rename, subshell (Ctrl+O), FTP/SFTP support, mouse-aware menus, Unicode support, very stable.
  • Cons: Looks dated by modern UI standards; preview capabilities are limited compared with newer tools.
  • Best for: Sysadmins who need predictable, keyboard-or-mouse workflows and remote file access.

Install — Ubuntu/Debian: sudo apt-get install mc -y; Fedora: sudo dnf install mc -y; Arch: sudo pacman -S mc.

Quick keys — F5 copy, F6 move/rename, F8 delete, F3 view, F4 edit, Ctrl+O toggle shell.

Notes — Use MC’s subshell to run shell commands without leaving the panels; scripts can be invoked from within MC to batch-process selections.

Ranger — Vim-like, three-column navigation

What it is: A modal, Vim-inspired file manager with a directory column, contents column, and a preview pane.

  • Pros: Familiar to Vim users (h/j/k/l navigation), automatic previews, highly configurable through rc.conf, integrates with external viewers via “rifle”.
  • Cons: Modal thinking has a learning curve for newcomers; previews depend on helper programs (w3m-img, chafa, bat) and terminal support.
  • Best for: Developers who prefer Vim keybindings and want powerful preview and opener integration.

Install — Ubuntu/Debian: sudo apt-get install ranger -y; Fedora: sudo dnf install ranger -y; Arch: sudo pacman -S ranger.

Quick keys — h/j/k/l to navigate, Enter open, gg/G go to top/bottom. Previews are automatic in the right pane; configure external tools via rc.conf.

Notes & tips — Install bat for colored file previews and configure rifle to choose preferred viewers. For remote shells, previewing needs either a terminal with graphics support or local-side rendering.

nnn — minimal, ultra-fast, keyboard-first

What it is: A tiny, single-column file manager focused on speed and minimalism, with an extendable plugin system.

  • Pros: Extremely fast startup and navigation; low memory footprint; useful plugins add search, preview, and mount helpers.
  • Cons: Minimal UI; many useful features require learning plugins or small helper scripts.
  • Best for: Environments where performance and simplicity are priorities — containers, older hardware, or scripting contexts.

Install — Ubuntu/Debian: sudo apt-get install nnn -y; Fedora: sudo dnf install nnn -y; Arch: sudo pacman -S nnn.

Quick keysspace to select, p paste (copy), v move; plugin invocation via the dot or environment hooks.

Notes — The plugin system is where nnn shines: add previewers, bulk actions, or integration with external tools. Good for automation because it’s lightweight and predictable in scripts.

Yazi — a modern, Rust-based option (with caveats)

What it is: A newer file manager written in Rust that aims for a polished terminal experience, including theme support and image previews when the terminal supports inline graphics.

  • Pros: Modern codebase (Rust), performance-oriented, nice defaults and theming, attempts richer in-terminal previews.
  • Cons: Image previews only work when the terminal emulator supports inline graphics or special protocols; project packaging and availability vary by distro.
  • Best for: Users who want a modern interface and are running a terminal emulator that supports inline images (see details below).

Install — Packaging varies. Yazi is available via some distribution channels and Flatpak/Flathub for certain platforms; check the project README or Flathub for the current package name and install instructions.

Notes — Before relying on image previews, confirm your terminal supports a compatible graphics protocol (Kitty, iTerm2, or terminals with Sixel support). If not, preview rendering will fall back to external display servers or degrade to ASCII/thumbnail fallbacks.

Missing names you may expect

Popular alternatives like lf and vifm were not covered above. They’re excellent — lf is a lightweight, Go-based file manager inspired by Ranger, and vifm is a Vim-like option that mimics the two-pane layout. The four profiles above were chosen to illustrate a clear decision spectrum: GUI-like, Vim-like, minimal-speed, and modern-Rust. If you live in Vim bindings and want a two-pane setup, try vifm; if you want Ranger’s philosophy with a smaller footprint, try lf.

Setting up image previews and terminal graphics — practical checklist

Image previews in terminal file managers are not magic; they depend on a chain of support:

  • Terminal emulator support: Kitty and iTerm2 offer inline image protocols; Terminology and some terminals support Sixel. Many modern terminals (WezTerm, Alacritty) have varying degrees of support or require specific protocols.
  • Helper programs: w3m-img, ueberzug, or chafa are commonly used to render images inside previews if your terminal supports the needed protocol.
  • SSH behavior: Over SSH, inline images typically won’t work unless the local terminal supports the protocol and you’re running the client locally (or you tunnel X11/Wayland, which has perf and security trade-offs).

Practical steps:

  1. Confirm your terminal: check its docs for “inline images”, “Kitty graphics protocol”, or “Sixel”.
  2. Install a preview helper: e.g., sudo apt install w3m-img chafa and configure your file manager to use it.
  3. Test locally first. If preview works locally but not over SSH, prefer using a local terminal that connects to the remote shell rather than attempting remote rendering.

Automation, containers and CI — how these tools fit

Terminal file managers are script-friendly. A few pragmatic uses:

  • Use mc subshell (Ctrl+O) to run maintenance scripts while keeping panels intact; useful for batch renames and ad-hoc fixes.
  • Embed nnn in small toolchains — its plugin hooks can call scripts to construct tarballs, upload artifacts, or mount remote shares.
  • Container workflows: run a lightweight manager like nnn inside a container for quick file inspection; use bind mounts to operate on host files safely.

Security checklist

  • Prefer SFTP/SSH over plain FTP. If MC or another manager provides FTP, ensure you’re using TLS or SFTP variants and authenticated keys.
  • Use SSH key-based authentication and strict host-key checking. Avoid password authentication for infrastructure access.
  • Be cautious with preview helpers — they may invoke external programs that parse files. Run them in an environment you trust or sandbox viewers inside containers or restricted users.
  • Audit plugins before installing. Plugins are powerful but can run arbitrary commands; treat them like any other third-party code.

Key takeaways and quick answers

  • Which tool should I try first?

    Try Midnight Commander (MC) for a GUI-like terminal experience. If you prefer Vim bindings, start with Ranger; if you want extreme speed and a tiny footprint, try nnn. Consider Yazi only if your terminal supports inline image protocols and you want a polished, modern UI.

  • Will image previewing work over SSH?

    Usually not by default. Inline terminal graphics require both the terminal emulator and the client to support the same protocol. For remote servers, prefer local rendering or use X11/Wayland forwarding with caution.

  • Can these integrate with automation and containers?

    Yes. Their terminal-first nature makes them easy to script and run inside containers. Use plugins and subshell features for automatable workflows, and prefer lightweight options (nnn) in CI contexts.

  • Are there security risks?

    Standard remote access risks apply. Use key-based SSH, avoid unsecured FTP, and sandbox or audit preview helpers and plugins before use.

Next steps

Pick one tool and give it a week. For teams, run a short pilot: define three real tasks (finding large log files, batch renaming, moving release artifacts) and measure time and errors before and after. Keep the rollout small—pair a veteran user with newcomers to transfer knowledge of keybindings, plugins, and safe preview setup.

Further reading