Midnight Commander

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 00:01, 17 September 2006 by Ramuk (Talk | contribs) (Why don't line drawing characters work?)

Jump to: navigation, search
Nuvola apps important.png 

This is a work in progress, all of the content of this article has not been verified to work, use it at your own risk



Midnight Commander[1] (mc)[2] is an orthodox file manager for Unix-like systems (also works in Windows) and a clone of Norton Commander.

Midnight Commander is a text mode application. The main interface consists of two panels which display the file system. It is used in a similar way to many other programs run in the Unix shell. Arrow keys control file selection, the insert key is used to select files and the Function Keys perform operations such as renaming, editing and copying files. Later versions of the Midnight Commander additionally have mouse support for easier operation. Such versions are aware of running inside an X terminal, which allows them to react to the graphical pointer and update the name of the window in which Midnight Commander runs.

Midnight Commander's features include the ability to view the contents of RPM package files, to work with common archive formats as if they were simply another directory, and to function as an FTP client. Midnight Commander also includes an editor called mcedit. mcedit is a separate executable, which can also be used independently of Midnight Commander. mcedit's features include syntax highlighting for certain languages, and the ability to work in both ASCII and hex modes. Users also have the option to replace mcedit with the editor of their choice.

Midnight Commander can also rename groups of files, unlike a number of other file managers that can only rename one file at a time. This is convenient for manipulating large collections of files, e.g. to make them conform to a new naming convention. Midnight Commander can also move files to a different directory at the same time as it renames them. It lets the user specify the original and resulting file names using wildcard characters. This makes the power of regular expressions in Unix or Linux available for renaming files, with a convenient user interface. In addition, the user can select whether or not to utilize "shell patterns" (automatic grouping of wildcards). All of these features are available by using the File > Rename/Move menu selection. (Pressing F1 would then produce a brief explanation of the options, including examples of how to use wildcards.)

Midnight Commander is now included in most Linux distributions and is licensed under GNU General Public License.

It is very popular on Linux due to being based on versatile text interfaces, such as Ncurses or S-Lang, which allow it to work on a regular console, inside an X Window terminal, over SSH connections and all kinds of remote shells.


Binary Only


Install the raw binary only[3]

wget http://www.unet.univie.ac.at/~a0025690/ppc-binaries/mc_ppc261.tgz 
tar -C / -xzvf mc_ppc261.tgz

Midnight Commander should be available by executing



Use apt-get to install Midnight Commander

apt-get install mc



ipkg install mc


Alexander Skwar has created a fairly extensive selection of Ipkg packages for the MIPSel (LS2) LinkStation, Install Ipkg and enable his feed:

ipkg install mc

Why don't line drawing characters work?

Since version 4.0.13 there's the command line option -a to force use of charaters +, |, - for line drawing (only available when compiled with S-Lang). Use the -a option if any of the suggestions below doesn't help.[6]

In general, there are three cases:

  • Lines are shown as ASCII characters like this
|         |

This also happens when you use the -a option. Other than that possible reason is 1 or 2 (see below).

  • Lines are shown as lower case characters like this
x         x

Possible reason is 1 or 2 (see below).

  • Lines are shown as blanks or missing characters. Possible reason is 2 or 3 (see below).

The reason for the problem is one of following:

  1. Your terminal might not support line drawing characters. VT100 compatible terminals, rxvt and xterm and color_xterm do support them.
  2. Your terminfo or termcap database might have missing or incorrect definitions for line drawing characters. Set the acsc variable in the terminfo database like this: acsc=a\376k\277l\332m\300j\331n\305w\302v\301u\264t\303q\304x\263h\2600\333 Don't forget issue 'tic' command. This supposes you are using PC character set. The octal values might be different for other character sets. If you are using termcap instead of terminfo, you should modify above solution appropriately.
  3. Your terminal font might not support line drawing characters. Try changing the font.


  1. Wikipedia: Midnight Commander
  2. The official site of GNU Midnight Commander
  3. The Linkstation Community Forum / Terastation (ppc) / How to install Midnight Commander ?
  4. The Linkstation Community Forum / Linkstation 2 (mips) / midnight commander (or similar) on LS?
  5. The Linkstation Community Forum / Linkstation 2 (mips) / Search for Midnight Commander LS2
  6. GNU Midnight Commander: Frequently Asked Questions
Link.png This article is currently a stub. You can help this Wiki by expanding it

. This template will categorize articles that include it into Category:Stubs.