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 -yInstall Midnight Commander.
pkg install mc -yMidnight Commander is now installed and ready to use.
Use Midnight Commander in Termux
Start Midnight Commander.
mcNavigation 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 --helpDisplay the current version.
mc -VOpen the built-in file viewer.
mc -v example.txtEdit a file.
mc -e example.txtPrint the data directory.
mc -fPrint extended information about the data directory.
mc -FPrint the configure options.
mc --configure-optionsEnable subshell support.
mc -UDisable subshell support.
mc -uLog the FTP dialog to a file.
mc -l ftp.logNavigate between files and folders using the Arrow Keys.
Open a selected directory or file by pressing:
EnterGo back to the previous directory by selecting:
..Exit Midnight Commander by pressing:
F10If 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.
