Posted on
Software

mc (Midnight Commander): Classic two-pane file manager

Author
  • User
    Linux Bash
    Posts by this author
    Posts by this author

Exploring Midnight Commander: The Classic Two-Pane File Manager for Linux

If you've ever immersed yourself in the world of Linux, you’ve likely encountered the need for an efficient file management tool. Midnight Commander, or mc for short, is a powerhouse in this realm that often goes unnoticed by new users but is cherished by those who seek a nostalgic yet functional approach to managing files. Today, we’ll discover why Midnight Commander remains relevant in modern Linux distributions and how you can install and use it to enhance your file management experience.

What is Midnight Commander?

Midnight Commander is a text-based, two-pane file manager developed originally in the early 1990s. It draws inspiration from earlier orthodox file managers, using a two-pane interface that allows users to manipulate files in a visual and intuitive way directly from the command line. Beyond basic file operations like copying, moving, deleting, and renaming, Midnight Commander also supports complex tasks such as searching for files, batch renames, FTP, and SSH connections.

Key Features of Midnight Commander

  1. Two-Pane Layout: Navigate directories and perform file operations across two independent panels.
  2. Built-in Support for Archives: Work with various archive formats like ZIP, RAR, and TAR without leaving the interface.
  3. Internal File Viewer and Editor: Inspect and edit the contents of a file without exiting Midnight Commander.
  4. FTP and SFTP Integration: Manage remote files directly through FTP/SFTP.
  5. Customizable Appearance: Customise the color scheme and layout to suit your aesthetics or visibility needs.
  6. Mouse Support: Although primarily a text-based application, mc supports mouse operations in the terminal.

Installing Midnight Commander

To enjoy Midnight Commander on your system, you must first install it. Here’s how you can install mc on various Linux distributions using different package managers:

Debian/Ubuntu (Using apt):

For Debian-based distributions like Ubuntu, you can install Midnight Commander using the apt package manager. Open your terminal and enter the following commands:

sudo apt update          # Updates the package lists for upgrades and installations.
sudo apt install mc      # Installs Midnight Commander
Fedora (Using dnf):

If you're using Fedora or any closely related RPM-based distribution, dnf is your go-to package manager:

sudo dnf install mc      # Installs Midnight Commander
openSUSE (Using zypper):

For openSUSE users, the zypper package manager efficiently handles installations:

sudo zypper install mc   # Installs Midnight Commander

Getting Started with Midnight Commander

To launch Midnight Commander, simply type mc in your terminal and press Enter. You’ll be greeted by the main interface consisting of two panels, which by default, display the contents of your current directory.

Navigating through directories is straightforward: use your arrow keys, or click with your mouse (if your terminal supports it). The function keys (F1 to F10) are mapped to various actions like view, edit, copy, and move, which boosts productivity by simplifying keystrokes.

Customizing Midnight Commander

Midnight Commander is highly customizable. To access the options, go to Options -> Layout or Configuration on the top menu. Here, you can adjust settings such as showing hidden files, enabling mouse support, and changing the color theme.

Conclusion

Midnight Commander stands as a testament to the enduring value of classic tools in the modern tech landscape. Whether you are a terminal enthusiast or a professional looking to manage files efficiently without leaving the command-line environment, Midnight Commander offers a comprehensive suite of features wrapped in a retro-style interface that promotes productivity.

Try installing it today on your Linux system to see just how seamless and powerful command-line file management can be.