Midnight Commander: the ultimate file manager for Linux

Introduction to Midnight Commander

Midnight Commander (MC) is a dual-pane file manager that has been a cornerstone of the Linux community since the mid-1990s. Inspired by the classic Norton Commander, MC combines the power of the command line with an intuitive text interface that lets you navigate, copy, move, and edit files without lifting your hands from the keyboard. Its lightweight design and wide availability on nearly all distributions make it an essential tool for both system administrators and advanced users seeking productivity in the terminal.

History and Evolution

Created by Miguel de Icaza in 1994 as part of the GNU project, Midnight Commander was born to offer a free, cross-platform alternative to the popular DOS Norton Commander. Since its first version, it has received continuous improvements: UTF-8 support, mouse subsystem integration, scripting capabilities via macros, and a plugin architecture that allows adding features such as FTP, SFTP clients and binary file viewers. Each release has maintained backward compatibility, ensuring that scripts and workflows from years past continue to work without modification.

Dual-Panel Interface

MC’s most distinctive feature is its side-by-side dual-pane layout that simultaneously displays the contents of two different directories. This layout makes operations such as copying or moving files between locations a simple keystroke away. Each panel can operate in detailed list view, compact view, or directory tree mode, and the user can switch modes with the F1 key or via the options menu. Additionally, MC displays an information bar at the bottom indicating the total selected size, permissions, and free space on the filesystem.

Key Features

  • Fast navigation with arrow keys, Tab to switch panels, and Enter to enter directories or execute files.
  • File operations: copy (F5), move (F6), delete (F8), create directory (F7), and rename (Shift+F6).
  • Built-in viewer capable of displaying text, images (via external tools like feh), binary files in hexadecimal, and data from compressed archives without needing to extract them.
  • Integrated editor (F4) based on MC’s internal editor, with syntax highlighting for several programming languages and search-and-replace capability.
  • Support for remote connections via FTP, SFTP, Fish, and SMB protocols, allowing you to treat remote systems as if they were local.
  • Customizable macros and shell commands that can be assigned to function keys or through the configuration file ~/.mc/ini.

Essential Keyboard Shortcuts

Mastering MC’s shortcuts considerably speeds up your workflow. Here is a list of the most useful ones:

  • F1 – Contextual help.
  • F2 – User menu (configurable).
  • F3 – File viewer.
  • F4 – Editor.
  • F5 – Copy.
  • F6 – Move or rename.
  • F7 – Create directory.
  • F8 – Delete.
  • F9 – Main menu.
  • F10 – Exit.
  • Tab – Switch between panels.
  • Ctrl+PageUp/PageDown – Navigate directory history.
  • Alt+Enter – Open the selected file with the default application.

Customization and Configuration

MC is highly configurable via several files located in ~/.mc/. The ini file controls aspects such as the color scheme, mouse activation, and panel behavior. Users can create custom color schemes using the mc.skin syntax or download predefined themes from repositories like GitHub. Additionally, you can define user commands in the F2 menu that execute shell scripts, allowing you to integrate frequent tasks such as backups, repository updates, or temporary file cleanup.

Comparison with Other Terminal File Managers

Although alternatives such as ranger, lf, and vifm exist, Midnight Commander stands out for its maturity, extensive documentation, and cross-platform support. Ranger offers a vim-like interface with previews, but lacks the internal editor and the wide range of MC’s plugins. Lf and vifm are more minimalist and fast, yet they require a steeper learning curve for users coming from graphical environments. In environments where an all‑in‑one solution with editor, viewer, and networking capabilities is needed, MC remains the most balanced choice.

Conclusion

After nearly three decades, Midnight Commander remains an indispensable tool for any Linux user who values the efficiency and power of the terminal. Its combination of dual-pane navigation, built-in editor, versatile viewer, and extensibility

This post is also available in ESPAÑOL.

Leave a Reply

Your email address will not be published. Required fields are marked *

Esta obra está bajo una Licencia Creative Commons Atribución 4.0 Internacional para Francesc Roig francesc@vivaldi.net .