Best Terminal File Managers for Linux

Moving files around a server often means switching between cd, ls, and several long paths. A terminal file manager keeps the directory listing on screen while you browse, select files, and copy them to another location. You can use one in a local terminal or after connecting to a server through SSH
.
The best choice depends on how you work. Midnight Commander gives you two directory panels and visible function-key shortcuts. Yazi and ranger put file previews beside the listing, lf lets you build workflows around shell commands, and nnn keeps the interface compact.
This guide compares these five Linux terminal file managers and shows you how to install and try each one.
Choosing a Terminal File Manager
If you are trying a terminal file manager for the first time, start with Midnight Commander. Its copy and move commands are shown along the bottom of the screen. Choose Yazi if browsing files with a preview pane matters more to you.
| File manager | A good choice for | Main tradeoff |
|---|---|---|
| Midnight Commander | Copying between two visible directories, including over SSH | Its menu-driven interface differs from Vim-style browsers |
| Yazi | Previewing files and managing background file operations | Rich previews need extra programs and compatible terminal graphics |
| ranger | Browsing a directory tree with Vim-style keys and configurable previews | Some previews need external programs |
| lf | Building a file browser around your own shell commands | Advanced actions and previews need configuration |
| nnn | Browsing in a small terminal and switching between directory contexts | Rich live previews require additional setup |
We tested Midnight Commander 4.8.33, Yazi 26.9.1, ranger 1.9.4, lf 38, and nnn 5.1 on Ubuntu 26.04. Each tool was opened against the same sample directory, and we checked copying a text file into its archive subdirectory. The recommendations focus on the interface, default file operations, and setup effort.
Prepare a Sample Directory
You can try the examples without touching your own files. Run the following commands in Bash to create a temporary directory containing a text file and an empty destination folder:
demo_dir=$(mktemp -d)
mkdir "$demo_dir/archive"
printf '%s\n' 'Maintenance notes' 'Keep a copy in archive/.' > "$demo_dir/notes.txt"Keep using the same shell for the launch commands below, since $demo_dir holds the path to this directory. If you try several tools, run this block again before each test to get a fresh directory without existing destination files. The screenshots use a larger sample directory with configuration files and documents to make the layouts easier to compare.
The installation examples use APT on Ubuntu, Debian, and derivatives. Refresh the package index once before installing a tool:
sudo apt updateYou only need to install the tools you want to try. For other distributions, follow the installation instructions linked from each project.
Midnight Commander: Two Panels and Visible Shortcuts
Midnight Commander
, usually started as mc, displays two directories side by side. You select files in one panel and copy or move them to the directory in the other. The bottom row shows the keys for common operations, so you can start using it without memorizing a set of letter combinations.
Install Midnight Commander with:
sudo apt install mcTo open the sample directory on the left and its archive folder on the right, pass both paths:
mc "$demo_dir" "$demo_dir/archive"
Use the arrow keys to highlight notes.txt in the left panel. Press F5 to open the copy dialog, check that the destination is the archive directory, and press Enter to confirm. The copy appears in the right panel. Press Tab to switch between panels.
You can view a file with F3, create a directory with F7, and quit with F10. To rename or move a file, F6 opens a dialog where you can review the destination before proceeding. When you select several files with Insert, the copy operation applies to that selection.
The Midnight Commander manual
also covers its virtual filesystems, including browsing archives and connecting to SFTP locations. That is useful when you want to browse a remote directory from a local instance of mc.
Its two-panel layout is a good fit for server maintenance and sorting files between directories. If your main task is reading source files while browsing, the preview-oriented layouts below may suit you better.
Yazi: File Previews and Background Tasks
Yazi combines a directory browser with a preview pane and a task manager for background operations. You can move through files while a copy is running, and its preview system supports text, images, and other formats through built-in handlers and external programs.
For Ubuntu and Debian, the project provides an official APT repository . Install the tools needed to fetch its signing key:
sudo apt install curl ca-certificatesSave the repository key in a dedicated keyring file:
curl -fsSL https://yazi-rs.github.io/builds/yazi-keyring.gpg | sudo tee /usr/share/keyrings/yazi-keyring.gpg >/dev/nullAdd the stable repository, limiting its signing key to this source with signed-by:
echo 'deb [signed-by=/usr/share/keyrings/yazi-keyring.gpg] https://yazi-rs.github.io/builds/ stable main' | sudo tee /etc/apt/sources.list.d/yazi.list >/dev/nullRefresh the package index and install Yazi:
sudo apt update
sudo apt install yaziThese commands add the upstream repository, so future APT upgrades can update Yazi from that source. The repository provides both amd64 and arm64 packages.
Start Yazi in the sample directory:
yazi "$demo_dir"
Use the arrow keys or h, j, k, and l to navigate. Highlight notes.txt and press y to mark it for copying. Enter archive and press p to paste it. Press q to quit, or F1 to open help. The quick start guide
explains the remaining default keys.
Text previews work without a graphical desktop, but richer previews have more requirements. For example, PDF previews use pdftoppm from Poppler, and video thumbnails use FFmpeg. Image display also depends on the terminal graphics support
, including the terminal and any multiplexer in between.
Yazi is a good starting point if previews are central to your workflow. On a minimal server, check which optional dependencies you actually need before adding the full preview stack.
ranger: Vim-Style Directory Browsing
ranger uses a column layout: the parent directory on the left, the current directory in the middle, and a preview on the right. Moving the cursor updates the preview, which makes it convenient to inspect text files as you work through a project.
Install ranger with:
sudo apt install rangerOpen the sample directory with:
ranger "$demo_dir"
Use j and k to move down and up, l to enter a directory, and h to return to its parent. The arrow keys also work. Highlight notes.txt, press yy to copy it, enter archive, and press pp to paste. Press q to quit.
The repeated letters are key sequences: yy means press y twice. If you already use Vim
, this pattern will feel familiar. Press ? to open ranger’s help choices.
ranger separates file opening from previews. Its rifle component chooses an application for a file, while scope.sh handles many previews using external tools. Text previews are available with the standard package; formats such as PDF files, archives, and images may need additional dependencies.
If you want to customize the keybindings, copy the default rc.conf into your user configuration directory:
ranger --copy-config=rcThis creates ~/.config/ranger/rc.conf when that file does not already exist. You can then adjust the bindings and settings there. ranger is worth trying if you like its three-column layout and want an established collection of preview and file-opening rules.
lf: A Browser You Can Extend with Shell Commands
lf , short for “list files,” offers a similar column layout with a different approach to customization. It is written in Go and distributed as a single executable. You extend it through shell commands and its configuration file, rather than through a Python plugin system.
Install lf with:
sudo apt install lfLaunch it in the sample directory:
lf "$demo_dir"
Use the arrow keys or h, j, k, and l to navigate. Highlight notes.txt and press y to copy it, enter archive, and press p to paste. Press q to quit. Unlike ranger, these copy and paste bindings use a single keypress.
lf provides basic text previews. To add previews for other formats, you configure a previewer program. You can also define actions for creating directories, running your editor, or processing selected files in ~/.config/lf/lfrc. The lf documentation
includes the configuration syntax and default bindings.
One useful way to inspect the available options is to read the documentation from the terminal:
lf -doclf does not provide its own tabs or built-in editor. If you want several file browsers open at once, you can place instances in tmux panes . This makes lf a good fit when you already have a shell and editor setup you want to reuse.
nnn: A Compact Browser with Directory Contexts
nnn shows a single directory listing, leaving more horizontal space for filenames. Its numbered contexts let you keep different locations open and switch between them. This layout is useful in a small terminal window or when you do not need a permanent preview pane.
Install nnn with:
sudo apt install nnnStart it in the sample directory:
nnn "$demo_dir"
Use the arrow keys to navigate and press Space on notes.txt to select it. The cursor advances after selection. Enter archive and press p to copy the selection into that directory. Press ? to see the available keys, and q to leave the current context.
Press a context number from 1 to 4 to switch locations. You can also press / to filter the current listing. nnn can enter a directory automatically when it is the only filter match, so pay attention to the path shown at the top as you type.
For a listing that includes file details, launch nnn with the -d option:
nnn -d "$demo_dir"The nnn usage guide covers its other modes and environment settings. Plugins add features such as richer live previews, but those workflows can require helper programs and additional configuration. Start with the basic browser if your main need is selecting and moving through files.
SSH and Terminal Compatibility
All five tools can browse files inside an SSH session. Install the file manager on the remote server, connect to it, and start the program there. Its directory listing and copy operations then apply to the remote machine. To copy between your computer and the server, use a supported remote-filesystem feature or a transfer tool such as rsync .
Function keys can be intercepted by your terminal or desktop. If Midnight Commander does not receive F5, press Esc and then 5 as two separate keypresses.
If file icons appear as boxes, choose a terminal font with the required symbols, such as a Nerd Font. This affects how the icons look; normal navigation and file operations still work. Our screenshots use a symbol-font fallback and the same terminal color palette for each tool.
Image previews need separate consideration. A working text preview does not mean that images will display through your SSH client and tmux configuration. Check the file manager’s preview documentation for your terminal before installing extra preview helpers.
When you are done testing, remove the sample directory:
rm -rf "$demo_dir"Conclusion
Try Midnight Commander first for two-panel file operations, or Yazi for a browser centered on previews. Once you have chosen one, keep the cp and mv commands available for repeatable work in scripts.
Tags
Linuxize Weekly Newsletter
A quick weekly roundup of new tutorials, news, and tips.
About the authors

Dejan Panovski
Dejan Panovski is the founder of Linuxize, an RHCSA-certified Linux system administrator and DevOps engineer based in Skopje, Macedonia. Author of 1000+ Linux tutorials with 20+ years of experience turning complex Linux tasks into clear, reliable guides.
View author page