Installation and information about Midnight Commander on Linux

To install Midnight Commander in Ubuntu/Debian, just run:

sudo apt-get install mc

To install on CentOS:

yum install mc

For start:
mc

I will describe some shortcuts while working in Midnight Commander:
Ctrl+O Switch between command line and mc.
Ctrl+l Updates all displayed information.
Ctrl+x c Runs the Chmod command for the selected object.
Ctrl+x o Runs the Chown command for the selected object.
Ctrl+x l Runs the command to create a hard link.
Ctrl+x s Runs the command to create a symbolic link.
Ctrl+x i Switches the passive panel to the “Information” mode.
Ctrl+x q Switches the passive panel to quick view.
Ctrl+x ! The menu item “Paneling Criteria” is executed.
Ctrl+x h Add the directory name to the “Directory”.

When editing:
Ctrl+a Moves the cursor to the beginning of the line.
Ctrl+e Moves the cursor to the end of the line.
Ctrl+b (same as left arrow) Moves the cursor one position to the left.
Ctrl+f (same as right arrow) Moves the cursor one position to the right.
Ctrl+w Search
Ctrl+k Deletes the text of the entire line.
Ctrl+Ins copy selected fragment to clipboard
Shift+Ins insert fragment from buffer
Selecting the text while holding down the Shift key will copy it to the clipboard

In Midnight Commander there is a built-in sftp and ftp-client, to use it, open the menu “Left Panel” or “Right Panel” and select “FTP-connection …” and enter the command:

user@host:port

or without entering the menu, just type in the command line:

cd /#ftp:user:password@host:port

Startup keys:
-a Disable the use of graphic symbols for drawing lines.
-b Run in black and white screen mode.
-c Enables color display mode.
-d Disable mouse support.
-s Turns on the slow mode of the terminal, displays fewer messages and unnecessary information.
-V Displays the version of the program.

If you made the first start of MC from the root user, then we will restore the rights to hidden directories in the user’s home directory:

chown -R user:user /home/user/

See also my article:
How to install Midnight Commander (MC) on Ubuntu 18.04

Leave a comment

Leave a Reply