Home > Midnight Command Cheatsheet

Midnight Command Cheatsheet

Keyboard shortcuts

This is not (yet?) a complete cheatsheet, just the most useful stuff (my opinion). Navigation/Viewing

UP, DOWN, PGUP, PGDN, HOME, and END all work as expected to move the selection

TAB switch between left and right panels

ALT-o open selected directory in other panel (and moves selection to next directory)

ALT-i open same directory in other panel (both will now list the same directory)

CTRL-u swap panels

CTRL-r refresh file/dir list

ALT-SHIFT-h open directory history

ALT-y go to back a directory in your history (then ALT-u to go forward)

MC also has lots of powerful file viewing options such as:

F3 - view file in built-in viewer (and F4 in viewer to view in hex mode!)

CTRL-x q - toggle "quick view" mode with viewer in other panel

Actions for files and directories

F7 create new directory

SHIFT-F4 create a new file

These commands work for a single selected file/dir (the highlight that moves with your keyboard’s UP and DOWN keys) or on all “tagged” files/dirs (see below).

F5 copy a file (default copies from current panel to other panel)

F6 move a file (default moves from current panel to other panel)

    You can also give the file a different name so this is also the "rename" feature

F8 delete

CTRL-x c chmod - change "mode" permissions

CTRL-x o chown - change owner

I already mentioned F3 to use the internal MC viewer, which I think is great. For editing, I prefer to use my external editor of choice (Vim) - so I use Options > Configure and uncheck “Use internal edit”.

F3 - view file in built-in viewer (then F4 while in viewer for hex mode!)

F4 - edit file in built-in editor (but see my note above about using external editor)

“Tagging” files/dirs is like “selecting”, but keep in mind that “the selection” in MC is the file/dir that is highlighted in the current panel. You can tag files by selecting them, glob patterns, and even regex:

INS tag/untag a file (ALT-SHIFT-8 inverts selection)

+ (SHIFT-=) tags by search pattern! (then use pattern "*" to tag all)

- untags by search pattern (again, use pattern "*" to untag all)

CTRL-x s create a relative path symbolic link to file/dir in other panel

    CTRL-x v same, but with relative path

Shell:

Shell commands are always available in the little command line at the bottom. Just start typing to enter commands as you normally would.

CTRL-o toggles full screen subshell

Note for newcomers:

In the shortcuts below, “C” stands for CTRL and “A” stands for “ALT”. This is a convention used in the Midnight Commander documentation and was kept here.

You can also use “ESC” instead of “ALT”, which is useful on Macbooks.

Main View

File View

C-f                           View the next file
C-b                           View the previous file