CentOS / RHEL 6: Install Midnight Commander File Manager

by on December 31, 2013 · 2 comments· LAST UPDATED December 31, 2013

in

I am a new CentOS Linux user. How do I install GNU mc (Midnight Commander) on Red Hat Enterprise Linux or CentOS Linux server version 5.x/6.x using bash command line?

Tutorial details
DifficultyEasy (rss)
Root privilegesNo
RequirementsNone
Estimated completion time5m
GNU Midnight Commander (also known as mc) is a free and visual file manager, licensed under GNU General Public License. It is a clone of Norton Commander. It was started by Miguel de Icaza in 1994. It's a feature rich full-screen text mode application that allows you to copy, move and delete files and whole directory trees, search for files and run commands in the subshell. Internal viewer and editor are included.

Install Midnight Commander (mc) On Centos / RHEL / Fedora Linux

Open the Terminal or login to remote server using ssh client. Type the following yum command to install mc:
# yum install mc
Sample outputs:

Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package mc.x86_64 1:4.7.0.2-3.el6 will be erased
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package  Arch         Version                Repository                   Size
================================================================================
Removing:
 mc       x86_64       1:4.7.0.2-3.el6        @rhel-x86_64-server-6       5.4 M
 
Transaction Summary
================================================================================
Remove        1 Package(s)
 
Installed size: 5.4 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : 1:mc-4.7.0.2-3.el6.x86_64                                    1/1
  Verifying  : 1:mc-4.7.0.2-3.el6.x86_64                                    1/1
 
Removed:
  mc.x86_64 1:4.7.0.2-3.el6
 
Complete!
{root@cyberciti.biz }#
{root@cyberciti.biz }# yum install mc
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mc.x86_64 1:4.7.0.2-3.el6 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package  Arch         Version                 Repository                  Size
================================================================================
Installing:
 mc       x86_64       1:4.7.0.2-3.el6         rhel-x86_64-server-6       1.6 M
 
Transaction Summary
================================================================================
Install       1 Package(s)
 
Total download size: 1.6 M
Installed size: 0
Is this ok [y/N]: y
Downloading Packages:
mc-4.7.0.2-3.el6.x86_64.rpm                              | 1.6 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 1:mc-4.7.0.2-3.el6.x86_64                                    1/1
  Verifying  : 1:mc-4.7.0.2-3.el6.x86_64                                    1/1
 
Installed:
  mc.x86_64 1:4.7.0.2-3.el6
 
Complete!

How do I use mc?

Simply type the following command:
$ mc
Sample outputs:

Fig.01: mc in action

Fig.01: mc in action

As you can see the screen of the Midnight Commander is divided into four parts. Almost all of the screen space is taken up by two directory panels. By default, the second line from the bottom of the screen is the shell command line, and the bottom line shows the function key labels. The topmost line is the menu bar line. The menu bar line may not be visible, but appears if you click the topmost line with the mouse or press the F9 key.

mc syntax and command examples

Here are some useful examples and syntax:

Force black and white display for mc

$ mc -b

Force color mode for mc

$ mc -c

Disable mouse support for mc

$ mc -d

Start mc with the internal editor

$ mc -e
$ mc -e /path/to/file.txt

mc Command Installation and Usage demo

This tutorial is also available in a video format:


(Video 01: RHEL / CentOS Linux Install GNU Midnight Commander Tutorial)

For more information see mc(1) command man page and the official GNU midnight commander home page.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 2 comments… read them below or add one }

1 Meghraj January 2, 2014 at 5:25 am

Nice Article and I get the latest info here, thanks nixcraft. Also I would like to share the new things if I come to know so that i would be helpful for others, again thanks nixcraft.

Reply

2 David Ramirez February 21, 2014 at 7:10 pm

Just to note my sympathy and dependence on this old-school interface. It is of daily use for me on this and other Linux platforms, and the Windows look-alike FAR (not that popular afaik) also makes the filesystem administration there a pleasure.

Reply

Leave a Comment

Tagged as: , ,

Previous Faq:

Next Faq: