Midnight Commander
Classic dual-pane file manager with built-in editor.
Official WebsiteFeatures
Installation
brew install midnight-commanderapt install mcpacman -S mcdnf install mcWhy use Midnight Commander?
Two-Pane Layout
Traditional Norton Commander-style two-pane structure. Always see copy/move destination while operating, intuitive file management.
Built-in Editor & Viewer
Powerful built-in editor (mcedit) and viewer included. Supports syntax highlighting, find & replace, macros, and more.
Virtual File System
Operate on FTP, SFTP, SMB, and archives (tar, zip, rpm, etc.) as if they were regular directories.
Mouse Support
Full mouse support despite being a terminal file manager. Beginner-friendly interface.
Installation
# Homebrew (macOS)
brew install midnight-commander
# APT (Debian/Ubuntu)
sudo apt install mc
# Pacman (Arch Linux)
sudo pacman -S mc
# DNF (Fedora/RHEL)
sudo dnf install mc
# Zypper (openSUSE)
sudo zypper install mcScreen Layout
Midnight Commander uses the traditional two-pane layout. Command line and function key hints are shown at the bottom.
┌─ Left Panel (/home/user) ──────────────┬─ Right Panel (/var/log) ─────────────────┐ │ Name Size Date │ Name Size Date │ │ .. Parent dir │ .. Parent dir │ │ .config/ 4096 Jan 15 09 │ alternatives.log 1234 Jan 20 10 │ │ .local/ 4096 Jan 14 18 │ apt/ 4096 Jan 20 10 │ │ Documents/ 4096 Jan 20 14 │ auth.log 45678 Jan 20 15 │ │>Downloads/ 4096 Jan 20 15 │ boot.log 890 Jan 18 08 │ │ Pictures/ 4096 Jan 10 09 │ dpkg.log 12345 Jan 20 14 │ │ .bashrc 220 Dec 01 12 │ kern.log 67890 Jan 20 15 │ │ .profile 807 Dec 01 12 │ syslog 123456 Jan 20 15 │ │ │ │ ├─────────────────────────────────────────┴─────────────────────────────────────────┤ │ Hint: Click to select file, double-click to open │ ├───────────────────────────────────────────────────────────────────────────────────┤ │ user@hostname:~$ _ │ ├───────────────────────────────────────────────────────────────────────────────────┤ │1Help 2Menu 3View 4Edit 5Copy 6Move 7Mkdir 8Delete 9Menu 10Quit │ └───────────────────────────────────────────────────────────────────────────────────┘
Basic Operations
| Key | Action |
|---|---|
↑ / ↓ | Move up/down |
Enter | Enter directory / Execute file |
Tab | Move between panels |
F1 | Help |
F9 | Open menu |
F10 | Quit |
Ctrl+O | Hide panels and show shell |
Ctrl+\ | Directory hotlist |
File Operations
| Key | Action |
|---|---|
Insert | Select/deselect file |
+ | Select by pattern |
- | Deselect by pattern |
* | Invert selection |
F3 | View file |
F4 | Edit file |
F5 | Copy (to other panel) |
F6 | Move/Rename |
F7 | Create directory |
F8 | Delete |
Virtual File System (VFS)
Midnight Commander can operate on various protocols and archive formats as if they were regular directories.
Network Protocols
ftp://- FTP connectionsftp://- SFTP (SSH)sh://- Shell (SSH)smb://- Samba/Windows shares
Archive Formats
.tar.gz,.tgz- tar + gzip.tar.bz2- tar + bzip2.zip- ZIP archive.rpm,.deb- Packages
# FTP/SFTP connection
# F9 -> Left/Right -> Shell link... or FTP link...
# Connect directly from command line
mc ftp://user@server.com/path
mc sftp://user@server.com/path
mc sh://user@server.com/path
# Include password (not recommended)
mc ftp://user:password@server.com/path
# When using SSH keys
mc sh://user@server.com/path
# Settings from ~/.ssh/config will be usedConfiguration & Customization
Configure via the F9 menu GUI or edit configuration files directly.
# Configure mc via F9 menu or edit config file directly
# ~/.config/mc/ini
[Midnight-Commander]
verbose=true
shell_patterns=true
auto_save_setup=true
auto_menu=false
use_internal_view=true
use_internal_edit=true
clear_before_exec=true
safe_delete=true
mouse_repeat_rate=100
double_click_speed=250
skin=modarin256-defbg
[Layout]
equal_split=1
first_panel_size=80
message_visible=1
keybar_visible=1
xterm_title=1
command_prompt=1
[Panels]
show_mini_info=true
kilobyte_si=false
mix_all_files=false
show_backups=true
show_dot_files=true
fast_reload=false
fast_reload_msg_shown=false
select_flags=6
quick_search_mode=2
simple_swap=falseBuilt-in Editor (mcedit) Configuration
# ~/.config/mc/ini [Misc] section
[Misc]
display_codepage=UTF-8
source_codepage=Other...
autodetect_langstrstrstrstrstrstrstrstrstrstrstrstrstr
find_ignore_dirs=
# Built-in editor settings
[Edit]
editor_tab_spacing=4
editor_word_wrap_line_length=72
editor_fill_tabs_with_spaces=true
editor_return_does_auto_indent=true
editor_backspace_through_tabs=false
editor_fake_half_tabs=false
editor_option_save_mode=0
editor_option_save_position=true
editor_option_auto_para_formatting=false
editor_option_typewriter_wrap=false
editor_edit_confirm_save=true
editor_syntax_highlighting=trueBuilt-in Editor (mcedit)
mc includes a powerful built-in editor mcedit. It can also be launched standalone with mcedit filename.
| Key | Action |
|---|---|
F2 | Save |
F7 | Search |
F4 | Replace |
F3 | Start block selection |
Ctrl+Y | Delete line |
F10 | Quit |
Tips
Browse Archives Directly
Press Enter on .tar.gz or .zip files to browse archive contents like a regular directory.
Quick Search
Press Ctrl+S for incremental search. Type part of filename to jump to matching files.
Hotlist (Bookmarks)
Press Ctrl+\ to show hotlist. Useful for registering frequently used directories.
Compare Function
Press Ctrl+X D for directory comparison. Compare contents of both panels with differences highlighted.