Getting started with Midnight Commander

Midnight Commander (MC) is a popular visual file manager for use in linux.

It can be installed quickly by running the following command;

For Debian:

sudo apt-get install mc

For CentOS, the command is:

sudo yum install mc

Here are some quick keyboard shortcuts to start using MC effectively;


↑↓ PgUp PgDown Pos1 End
Move through filelist
Switch between the two windows
Select main menu on top of the screen.
F1 .. F10 or Esc+1 .. Esc+0
Run actions shown on the bottom of the screen
Only if no command was entered: Open folder from filelist or start executable file.
Start quicks­earch in current windows
Esc Esc
Exit from a menu or function. Esc has to be pushed in quick succession

Running commands

Enter comman­dline (while a windows is selected)
← →
Move in the comman­dline
Ctrl+←, Ctrl+→
Move in the comman­dline one word at a time
Run the comman­dline
Alt+Enter, Ctrl+Enter
Add the focused item (file,­fol­de,..) in the current windows at the cursor position.
Ctrl+x t
Add all selected items from the current window
Ctrl+A, Ctrl+E
Go to the beginn­ing/end of the comman­dline
Hide Interface, show command output

Selecting Files&Di­rec­tories

Ins (Insert key)
Toggle selection of the focus item and move down
+ (*)
For entering a pattern to select items by (i.e. *.txt)
– (*)
For entering a pattern to unselect items by
* (*)
Reverse file selections in (folders are unaffe­cted)
All selection commands affect the current window only.
(*) Only if no comman­dline was entered.

Comman­dline placeh­olders

The selected item in the current windows. The focused item, if there are no selected ones.
%d, %D
The director yshown in the curren­t(%d) or other(%D) window
Complete filenames of the other window.
A single %-char­acter
Example: unzip %D/%S (Extracts selected zip file from the other window into the current one)

Important file actions

Copy selected files/­folders (other window’s path is pre-se­lected)
Move selected files/­folders (other window’s path is pre-se­lected)
Rename focused file (current name can be edited)
Ctrl+X Ctrl+A
Edit target of focused symbolic link
Delete selected or focused item(s). There’s no virtual trashbin .
Show text content of focused file.


Check out their main page for further documentation;

Leave a Reply

Your email address will not be published. Required fields are marked *