Content
    Panels

Midnight Commander

Panels

KeysFunction
ALT + uSwap panels
ALT + tSwitch listing mode (full, brief, long …)
ALT + iShow current directory in other panel (synchronize)
ALT + ,Toggle layout between left-right and top-bottom
KeysFunction
CTRL + PgUpChange to parent directory
ALT + oOpen selected directory (or parent directory if file is selected) in other panel
ALT + SHIFT + hShow directory history
ALT + yOpen previous directory from history
ALT + uOpen next directory from history

Searching

  • Search dialog: ALT + ?
  • Quick search:
    • ALT + s (or CTRL + s)
    • use same shortcut jump to next match
    • wildcards (*, ?) can be used

File Selections

Keys (Alternative)Function
INS (CTRL + t)Select current file
+Select files by pattern
\Un-select files by pattern
*Reverse selection

Shell

KeysFunction
ESC TabShell completion, 2x for list of possibities, works also in dialog fields
CTRL + OToggle between shell and mc
ALT + ENTERCopy current file name to shell

Viewing and Editing

KeysFunction
F3Internal viewer
SHIFT + F3View raw content
F4Edit

The editor can be changed:

  • Disable Options > Configuration > Use internal edit
  • Set envronment variable EDIT to preferred editor

Function Keys

The function keys (F1 - F10) can be emulated by using ESC + 1 - ESC + 0

Wrapper Script (mc-wrapper)

The mc-wrapper script allows that the shell changes to the current directory when exiting mc.

It can be activated by setting an alias.

On Linux:

alias mc='. /usr/libexec/mc/mc-wrapper.sh'

On macOS (homebrew):

 alias mc='. /usr/local/opt/midnight-commander/libexec/mc/mc-wrapper.sh'

Terminal Emulator Settings

GNOME Terminal (3.28.2)

  • Disable Edit > Preferences > General > Enable the menu accelerator key (F10 by default)
  • Change Edit > Preferences > Shortcuts > Help > Contetns to Shift+Ctrl+F1
  • Change Edit > Preferences > Shortcuts > Tabs > Switch to Previous Tab to Alt+Page Up
  • Change Edit > Preferences > Shortcuts > Tabs > Switch to Next Tab to Alt+Page Down

References

  • Use Midnight Commander like a pro
  • MC Tutorial


  • Category

  • Programming

  • Tags

  • Tools
    Cheat Sheet
    Unix
    Linux

  • Created

  • 5. June 2018


  • Modified

  • 16. May 2022