Midnight Commander
Here are some basics for using midnight commander. See ‘man mc’ for much more as well as the help that is in mc itself.
Start
- To start midnight commander type ‘mc’ on the commandline. mc really shines in console mode. If you are using X, you may just as well use one of the GUI file browsers.
- If you add the paths of two directories to the command, the first is opened on the left and the second on the right.
- To move back and forth between the two directory panels, use TAB. Having the two panels makes it easy to copy or move things from one to the other and see where you are.
Commands
Commandline on bottom
Run a normal command here. For example, cd quickly by just using the normal cd. command here
Function Key Menu on bottom
The bottom menu allows you choose to View, Edit, Copy, Move, Delete files and directories. Use the Function keys that correspond with the commands listed. F3 to View and so on. The command to Quit (F10) is also there for your convenience.
Menu on Top
- Get there with F9
- You can filter and find files using the top Menu. Choose Left or Right depending which Panel you want to work with and Filter under that. Find is under the Command Menu and you will see the keystrokes that you could use instead to run that command.
- Safe Delete Choose Options and Configuration, check the last item on the right hand side, then Save. This will cause an, “are you sure”, confirmation window to popup, giving you one last chance to cancel deletes.
- A powerful feature of mc is tagging files and then performing a command on them. Tag one file using the INSERT key. Untag it with the same key. Tag (Select) a group of files using Alt-+ or the command ‘select Group’ under File in the upper menu.
Hot Keys for use with MC
- They are generally indicated in the menus
- Alt c this will bring both left and right side panels into the same directory as the one you were in.
- Ctrl c this toggles from the, side by side file manager view, to the commandline (in the directory from which you came)
- Even though you can use the commandline prompt below the panels for entering commands, you will not see the actions taken place
- Using the Ctrl c method and then entering your command at that prompt, you can watch the results of your command as it works.
- This comes in handy when the command failed, yet you just saw nothing happened and don’t know why it failed.
- Alt-? Does Find. You can choose Panelize after the find is complete and it will list those files found in the Current Panel.
Other Uses to look for
- With mc you can change permissions, compress directories, look at what files are in a compressed directory and more. All these things can be done with ordinary commands, but mc has it all there in one program and is menu driven.
- My favorite use for the program is pruning directories. I can quickly see what is there and open the file to see what the text is in it. It has a pretty easy to use editor for the newbie as well. ‘mcedit <filename>’ will bring it up. Of course the editor is readily available from within mc.
Eye Candy for mc
You get get mc to have a transparent background and hence display a shell background (in my case, a nice image).
To add this feature to mc, create a Color section in the ini file, by adding the following 2 lines to the /home/youruser/.mc/ini file (the second line is on one line only):
[Colors]
base_color=normal=white,default:marked=magenta,default:selected=,default:markselect=,default:errors=,default:input=,default:gauge=,default:reverse=,default:menu=,default:menusel=,default:menuhot=,default:menuhotsel=,default:dnormal=,default:dfocus=,default:dhotnormal=,default:dhotfocus=,default:helpnormal=,default:helpitalic=,default:helpbold=,default:helplink=,default:helpslink=,default:viewunderline=,default:executable=,default:directory=,default:link=,default:stalelink=,default:device=,default:special=,default:core=,default:editnormal=,default:editbold=,default:editmarked=,default
I have prepared a nice picture to put here, but I don’t know how to put it in the wiki!!!
— D. Raymond 2005/10/01 22:57
Copyright (c) by the authors.
Prior to editing, authors agreed to license their contributions by the terms of the GPL.
See our licensing page for details.
Linux® is a registered trademark of Linus Torvalds.
Welcome to LinuxBasics.org - The online community that helps people to get Linux installed and running.
During this tour, we will guide you through our website, which has many facets which wait to be explored
The biggest project we are running is our Linux course, based on the LBook.
The book is stored in wiki-format, which enables us to update and correct it as we go.
Discussion for the course is on our Forum
Our Forum is used for discussion of Linux and for questions and answers.
Search the mailing-list that was used prior to the Forum.
The questions and answers from the list are stored in the list's archives in order to help others with the same problems.
Every weekend, we meet to chat in IRC. These meetings are NOT mandatory, but are a nice chance to get to know each other better.
IRC is also a great tool to solve many problems, since it is very quick and easy to ask for more details if you need them.
The tutorials are one of the oldest sections on the LBo-website.
Here you find explanations on how to do specific tasks in Linux. Many of the tutorials were created after a certain problem
has been discussed (and usually solved :) on the mailing-list.
The tutorials are categorized in
In the links section, you find outbound links to other valuable resources.
One of our later additions to the site. We maintain a mirror of the Linux Documentation Project. This is our contribution to the "home of the HOWTOs"
Another later addition is the LBlog which focuses on how to do stuff on the Linux Desktop. It begins with the basics on installing Ubuntu.
Using the integrated site-search, you can search the tutorials, the LBook and all other wiki-pages
Simply type the search term into the box in the upper-right corner of our webpages
As a community, we depend on your feedback and collaboration. So, if you have something to share with others, please contact us. If you have a suggestion for a topic you would like to see covered here, please add it on the Wishlist.
There are many ways to contribute: You can answer questions on the Forum, you can write a complete tutorial or just a step-by-step documentation on how you completed a specific task using linux. Ask questions if the information on this site is not clear, tell us if we got something wrong, spell-check our writings, whatever.
We are looking forward to meeting you at LinuxBasics.org
Anita, Jisao, Sam and Stefan