Getting Started with Midnight Commander: A User-Friendly File Management Tool

Prerequisites

Linux or Unix-based Operating System: Midnight Commander is primarily used in Linux, macOS, or other Unix-based systems
Before using MC, you must install it on your system. Most Linux distributions have it available through package managers like apt, dnf, or yum, and Homebrew for macOS
Root or sudo privileges

Introduction

If you’ve ever found yourself navigating through a terminal window, managing files in a text-based environment, you know how challenging it can be without the comfort of a graphical user interface (GUI). Enter Midnight Commander – a powerful, user-friendly file management tool that brings the best of both worlds to your command line.

Midnight Commander, or mc, is a text-based file manager that allows you to easily manage files and directories with a simple and intuitive interface, all within the terminal. With its dual-pane layout, rich feature set, and seamless integration with the shell, Midnight Commander can boost your productivity whether you're working remotely, on a server, or simply prefer the command line to a GUI.

In this guide, we’ll walk you through the basics of getting started with Midnight Commander, covering everything from installation to its key features and commands. Whether you're a beginner or an experienced user, Midnight Commander is sure to make your file management tasks faster, easier, and more efficient.

Let’s dive in and see how this powerful tool can transform your terminal experience!

Installation of Midnight Commander

To install MC, run one of the following commands based on your system:

Debian/Ubuntu-based systems:

sudo apt update
sudo apt install mc

Red Hat/CentOS/Fedora-based systems:

sudo dnf install mc

macOS (via Homebrew):

brew install midnight-commander

Launch Midnight Commander

Open your terminal and type the following command to start Midnight Commander:

mc

Midnight Commander Interface

When you start MC, the window is divided into two panels:

  • Left Panel: Displays files and directories in the current directory (default location is your home directory).
  • Right Panel: Can be used to navigate another directory or even the same directory as the left panel.

Basic Navigation

You can use your keyboard to navigate through the interface:

  • Arrow Keys: Move up, down, left, and right through the files and directories.
  • Tab Key: Switch between the left and right panels.
  • Enter Key: Open directories or execute selected files.
  • F1 - F10 Function Keys: Each function key has a dedicated action:
    • F1: Help
    • F2: Access the User menu
    • F3: View file content
    • F4: Edit file
    • F5: Copy files or directories
    • F6: Move files or directories
    • F7: Create new directories
    • F8: Delete files or directories
    • F9: Open the command menu
    • F10: Exit Midnight Commander

Final Thoughts

Midnight Commander is a versatile, time-saving tool that brings simplicity and power to your terminal experience. Whether you're managing files locally or remotely, its intuitive dual-pane interface and wide range of features make file navigation and manipulation a breeze, all without leaving the command line. As you become more familiar with Midnight Commander, you'll find it an invaluable part of your daily workflow, offering speed and efficiency in managing your system.

For those looking to explore more advanced features or get involved in the development of this open-source project, the official Midnight Commander website is a great resource to check out. There, you can find documentation, download the latest version, and contribute to the community.

With Midnight Commander in your toolbox, you'll be able to handle your file management tasks like a pro — all from the comfort of your terminal. Happy navigating!

Popular (all time)

Related articles

How to Edit Your WordPress Admin Username and Author Slug via MySQL

In this guide, we’ll walk you through the process of editing both the admin username and author slug using MySQL. Whether you’re looking to strengthen your site's security or simply personalize your author URL, this straightforward method will help you make the changes with ease.

Getting Started with React

In this guide, we will cover the basics of setting up a local development environment, starting a simple React project, and the basics of how it works.

How to Simplify Your Terminal with Custom Bash Aliases

By creating custom shortcuts for your most-used commands, you can save time, reduce errors, and make your terminal experience faster and more enjoyable. In this guide, we’ll show you how to create and manage your own Bash aliases to simplify your terminal workflow and boost your productivity.