$linuxjunkies
>

mc(1)

Midnight Commander is a visual file manager and shell for Unix-like systems with a Norton Commander-style interface.

UbuntuDebianFedoraArch

Synopsis

mc [OPTION]... [PATH] [PATH]

Description

Midnight Commander (mc) is a full-featured visual file manager that provides an intuitive two-panel interface for navigating directories, managing files, and executing commands. It includes built-in viewers for various file types, a text editor, FTP client, and archive handling capabilities.

The dual-pane layout allows you to browse different directories side-by-side, making file operations like copying and moving straightforward. mc works in terminal environments and supports mouse interaction, making it accessible both via keyboard shortcuts and mouse clicks.

Common options

FlagWhat it does
-a, --nocolorDisable color output, use black and white only
-b, --nomouseDisable mouse support in the interface
-e, --edit FILEOpen FILE directly in the built-in editor (mcedit)
-f, --datadir DIRSet alternative data directory for mc files
-u, --nosubshellDisable subshell, run commands in parent shell
-v, --view FILEOpen FILE in the built-in viewer (mcview)
-V, --versionDisplay version information and exit
-h, --helpShow help message with available options
-P, --printwd FILEPrint current directory to FILE on exit
-S, --skin SKINLoad specified color skin or theme

Examples

Launch Midnight Commander with default settings in the current directory

mc

Open mc with left pane in documents folder and right pane in /var/log

mc /home/user/documents /var/log

Open myfile.txt directly in the built-in text editor (mcedit)

mc -e myfile.txt

View largefile.log using mcview, the built-in file viewer

mc -v largefile.log

Start mc without colors for monochrome terminals or accessibility

mc -a

Launch mc with mouse support disabled, keyboard-only navigation

mc --nomouse

Start mc with the 'gotar' color theme

mc -S gotar

Exit mc and save the current working directory to /tmp/mc_pwd

mc -P /tmp/mc_pwd

Related commands