Midnight Commander (mc) in Termux – Installation & Usage Commands

Midnight Commander (mc) is a terminal-based file manager that provides a simple and efficient way to manage files and directories using a two-panel interface. It allows to browse folders, copy, move, rename, delete, and edit files from the terminal, making file management faster and more convenient.

Here’s what you can do with Midnight Commander in Termux:

  • Browse files and folders.
  • Copy and move files.
  • Rename and delete files.
  • Create new directories.
  • Edit text files.
  • Search for files.
  • Manage files using a two-panel interface.

Install Midnight Commander (mc) in Termux

Below are the simple commands to install Midnight Commander in Termux. Copy and run the commands one by one to install the tool.

Update Termux packages.

pkg update && pkg upgrade -y

Install Midnight Commander.

pkg install mc -y

Midnight Commander is now installed and ready to use.

Use Midnight Commander in Termux

Start Midnight Commander.

mc

Navigation in Midnight Commander:

  • Esc + 0 (or F10) – Exit Midnight Commander.
  • ↑ / ↓ Arrow Keys – Move up and down through files and folders.
  • ← / → Arrow Keys – Switch between the left and right panels.
  • Enter – Open the selected file or directory.
  • Tab – Switch to the other panel.
  • Home – Go to the first file in the current directory.
  • End – Go to the last file in the current directory.
  • Page Up – Scroll one page up.
  • Page Down – Scroll one page down.
  • Backspace – Go to the parent directory.
  • Ctrl + \ – Open the directory hotlist (if configured).

Display the help menu.

mc --help

Display the current version.

mc -V

Open the built-in file viewer.

mc -v example.txt

Edit a file.

mc -e example.txt

Print the data directory.

mc -f

Print extended information about the data directory.

mc -F

Print the configure options.

mc --configure-options

Enable subshell support.

mc -U

Disable subshell support.

mc -u

Log the FTP dialog to a file.

mc -l ftp.log

Navigate between files and folders using the Arrow Keys.

Open a selected directory or file by pressing:

Enter

Go back to the previous directory by selecting:

..

Exit Midnight Commander by pressing:

F10

If your device does not have function keys, you can usually press Esc followed by 0 to perform F10, or use the extra keys available in the Termux keyboard.

End Note

Midnight Commander is a fast and easy-to-use terminal file manager that simplifies file management using Termux. Its two-panel interface, built-in editor, and useful keyboard shortcuts make it an excellent tool for both beginners and advanced Linux users.

SHARE THIS POST: