See the following for additional online tutorials:
The GNU Midnight Commander is a console file manager and directory browser. It is the quickest way to copy, move, delete and otherwise manage all files on a system. It can also do fast FTP and network file transfers. MC has its own inbuilt textfile viewer and editor, the ability to browse inside archives and to undelete files. It supports several virtual file systems (VFS) such as tarfs to view the contents of the several archive formats (tar, tgz, bz2, rpm etc.) ftpfs to browse FTP repositories of a remote server, fish to manipulate files on a remote server over ssh, and undelfs to recover deleted files.
Midnight Commander can be invoked simply by entering mc on the commandline. Its User interface has four sections:
- The Menu Bar
- The Directory Panels
- The Function Keys
- The Commandline Prompt
The Menu Bar
Located at the top of the screen, it is accessed by pressing F9. Five menus appear:
- Left Options to control the left panel.
- File Options to manipulate files.
- Command Options to edit various mc configuration files.
- Options Options to change configuration and layout.
- Right Options to control the right panel.
The Directory Panels
Two panels occupy most of the screen. By default, each points to a Target Directory and displays a list of files and subdirectories within it. At top of the listing is the token ../ which indicates the parent (upper) directory of the Target Directory. The Up and Down Arrow keys move the cursor vertically in the active panel, and the Tab key toggles the cursor back and forth between Left and Right Panels. Both Panels can display the same Target Directory, but normally they will display different directories, when the active directory becomes the Source for copying or moving files, and the inactive directory becomes the Destination.
The commandline is always present beneath the panels for entering and executing commands. The panels disappear whilst the command is executing, and the Configuration menu allows them to return immediately or after a keypress. Alt-Enter copies the filename beneath the cursor to the commandline, and is a real time-saver.
Function Key Bindings
The Function keys are widely used in mc for file operations. Read the bar at the bottom for their current function, which may differ according to the context, eg. browsing a directory, using the file viewer, or the editor.
|F1||Help. More readable than the 2000-line man page, although difficult to browse.|
|F2||User menu. Offers options to gzip files, etc. and can be suxtomized by the User.|
|F3||View the file under the cursor or view the contents of an rpm or tgz file.|
|F4||Edit the file under the cursor.|
|F5||Copy the file or directory under the cursor, or selected files and directories.|
|F6||Rename or move the file or directory under the cursor or selected files and directories.|
|F7||Create a directory.|
|F8||Delete the file or directory under the cursor or selected files and directories.|
|F9||Open the Menu Bar.|
|Up & Down Arrows||Move cursor vertically in the active panel.|
|Tab||Toggle the cursor between Left and Right Panels. In menus, moves sequentially through selection boxes.|
|Ctrl–O||Toggle the panels On and Off to reveal the console command screen beneath.|
|Ctrl-\||Open directory hotlist (bookmarks).|
|Alt-C||Quick cd (directory change.|
|Insert||Toggle select and deselect of the file beneath the cursor.|
|Shift-+||Select group. Wildcards can be entered to select files.|
|Keypad-+||Select group. Wildcards can be entered to select files.|
|\||Unselect group. Opposite of Shift-+|
|(Shift) *||Invert selection.|
|Ctrl-R||Refresh or rescan directory listing.|
|Ctrl-X D||Compare directories (release Ctrl-X before pressing D)|
|Ctrl-X C||Invoke chmod on the file or directory under the cursor or the selected files or directories.|
|Ctrl-X O||Invoke chown on the file or directory under the cursor or the selected files or directories.|
|Ctrl-X S||Create a symlink to the selected file in the opposite panel.|
|Alt-Enter||Copy the filename beneath the cursor to the commandline.|
|Space Bar||In menus, toggle tick boxes on and off.|