Home | Switchboard | Unix Administration | Red Hat | TCP/IP Networks | Neoliberalism | Toxic Managers | |
May the source be with you, but remember the KISS principle ;-) Bigger doesn't imply better. Bigger often is a sign of obesity, of lost control, of overcomplexity, of cancerous cells |
|
|
Open console and type on command prompt:
mc
and press Enter.
There are other ways to start mc. If you enter a directory, it will open in that directory
mc ~/.mc
will open the current directory and ~/.mc
mc ~/.mc /usr/share/mc
will open ~/.mc and /usr/share/mc
The first directory will be in the panel you were in the last time you opened mc. e.g. if you left mc with the right panel selected, mc ~/.mc /usr/share/mc will open /usr/share/mc on the left and ~/.mc on the right.
Notes:
??? Ctrl-Shift-Enter copies full path of selected file in the command line
This section lists keys which are useful to avoid excessive typing when entering shell commands.
- Alt-Enter
- copy the currently selected file name to the command line.
- C-Enter
- same a Alt-Enter. May not work on remote systems and some terminals.
- C-Shift-Enter
- copy the full path name of the currently selected file to the command line. May not work on remote systems and some terminals.
- Alt-Tab
- does the filename, command, variable, username and hostname completion for you.
- C-x t, C-x C-t
- copy the tagged files (or if there are no tagged files, the selected file) of the current panel (C-x t) or of the other panel (C-x C-t) to the command line.
- C-x p, C-x C-p
- the first key sequence copies the current path name to the command line, and the second one copies the unselected panel's path name to the command line.
- C-q
the quote command can be used to insert characters that are otherwise interpreted by the Midnight Commander (like the '+' symbol)
- Alt-p, Alt-n
- use these keys to browse through the command history. Alt-p takes you to the last entry, Alt-n takes you to the next one.
- Alt-h
displays the history for the current input line.
|
Switchboard | ||||
Latest | |||||
Past week | |||||
Past month |
![]() |
![]() |
![]() |
Give Me Fish, LLC - Cross-platform C++, Scientific and Technical Programming
Midnight Commander Cheat Sheet ============================== Ctrl-o Toggles to/from cl environment Ctrl-t Toggles a file onto/from the "tagged list" Ctrl-r Refresh both views Ctrl-l Reformats the screen (I often need to after opening external files such as PDFs, which cause MC to display strangely.) Ctrl-u Swap lhs and rhs panels Other panel views: Ctrl-x q Toggles other panel to/from "quick view". Views text. Ctrl-x i Toggles other panel to/from "info view". Views file info. F3 Toggles to full panel view of text file. Ctrl-x t Copies/pastes the currently selected filename(s) to the cl [Effective for using svn commands w/multiple files] Alt-enter Copies currently highlighted file to the cl Ctrl-+ Prompts for a reg-ex string and selects files based on it Ctrl-* Selects all files in cwd Ctrl-x p Copies the current directory to the command line Ctrl-x s Creates symlink of the file you're currently on (defaults to placing that symlink in the dir in the opposite panel). Alt-p Brings to the CL the previously issued command-line within MC Alt-n Brings to the CL the next issued command-line command within MC Alt-c Allows you to cd while preserving whatever is on the CL Ctrl-\ Gets you to hotlist Esc-tab Completion for command line (like Bash autocomplete) Alt-i CD's the other panel to the current panel's CWD Alt-o CD's the other panel to directory you are currently highlighting cd - On the command line, type "cd -" to return to the directory you were previously in. This is very handy if you accidently change directories (eg, sync other pane to same dir as current pane) Hit return when on an archive library (libMylib.a) and see what object files have gone into creating the library. In order to get a pane as an FTP directory, at the MC command line, type: cd /#ftp:mpeavy:PASSWORD@teghis.pair.com NOTE: PASSWORD is not encrytped cd /#ftp:mpeavy@teghis.pair.com To be prompted for your password (still not encrytped) cd /#ftp:mpeavy@teghis.pair.com/home/peavy NOTE: gets you to your home dir directly. **BETTER** - use scp / sftp instead: cd /#sh:mpeavy@teghis.pair.com/home/peavy Secure. Also, starts in home The above ftp/sftp locations can be added to the hotlist. In configurations, can set to not show backup (~) files. -------------- Use the External Panelize functions to filter and perform external commands multiple times, eg, to view all header files. Ctrl-x ! - Enter the External Panelize input screen. Choose a command or type another command to be executed. Eg: find all header files with: find . -name *.h Save oft-used commands for re-use. Will save the output results in the panel you were in. To refresh the panel back to the orig. dir view, refresh: Ctrl-r -------------- Colors (Background, foreground, and transparency) http://plug-and-pray.blogspot.com/2009/09/editing-midnight-commanders-color.html http://my.opera.com/kurzon/blog/2009/08/08/midnight-commander-col
Key | Action | |
Ctrl+o | toggle panes on/off | |
Ctrl+l | redraw screen | |
Ctrl+PgUp | goto parent dir | |
Ctrl+Enter | copy selected filename to command line | |
Ctrl+x+p | copy unselected panel's path to command line | |
Shift+mouse | select text | |
Insert | toggle selection of highlighted file | |
'*' | toggle selection | |
'+' | add pattern to selection | |
'-' | remove pattern from selection | |
F3 | view | |
F4 | edit | |
F5 | copy | |
F6 | rename | |
F7 | mkdir | |
F8 | remove | |
F9 | menu | |
F10 | Exit | |
Open directory menu | CTRL + \ | CTRL + D |
Compare directories | CTRL-X + D | SHIFT + F2 |
Rescan (refresh panel contents) | CTRL + R | F2 |
Hide panels | CTRL + O | SHIFT + ESC |
Reverse selection | M + * | NUM * |
Find file | ALT + ? | ALT + F7 |
Quick view | CTRL-X + Q | CTRL+Q |
Change file and directory rights - chmod | Ctrl-X + C | n. a. |
Change file and directory owner - chown | Ctrl-X + O | n. a. |
Make symlink | Ctrl-X + S | SHIFT+CTRL+F5 |
CTRL-X + D sequence must be issued by pressing together CTRL and X, and then D button - like in Emacs editor. A shortcut which should be mentioned here is ESC+0,1,2 9 which replaces all function keys F1 to F10. It is indispensable in terminals which do not support F1-F10 buttons.
...
![]() |
![]() |
![]() |
Section 1 Menu bar: Located at the top of the screen and has the following options. Press F9 (or) Esc 9 to access the menu bar.
- Left Options to control the display of the left directory panel
- File Options to manipulate files
- Command Options to edit various mc configuration files
- Options Options to change layout, setup VFS
- Right Options to control the display of the right directory panel
Section 2 Directory panels: Located in the middle and occupies large part of the screen. By default, it displays both left and right directory browsing panels, where you can view contents of two different directories at the same time.Section 3 Function keys: Located at the bottom and has following options. Press Esc key followed by the corresponding menu number to access these functions.
- Help Display in-built mc help.
- Menu Displays user defined menu items. You can create custom menu item to execute some complex steps of operations on the selected file. for e.g. compress the selected file and copy to a remote server with a single click. To edit the menu item file, click F9 (invoke menu bar) -> Command -> Edit Menu File
- View View the selected file content using mcview, a viewer for midnight commander.
- Edit Edit the selected file using mcedit, an editor for midnight commander.
- Copy Copy the selected file. If both panels are displayed, it will copy the file to the other panel. mc will ask for confirmation before doing any changes such as, copy file, delete file, move file etc.,
- RenMov Move/Rename the selected file.
- Mkdir Create a new directory under the selected directory.
- Delete Delete the selected file.
- PullDn This will highlight the Menu Bar. This option is helpful when F9 doesn't work to invoke the menu bar.
- Quit To quite midnight commander, press Esc key followed by 0.
Section 4 Command Line prompt: Using midnight commander does not take away the command line from power user. You can start typing an Unix command anytime and press enter to execute it. Command line prompt is located towards the bottom of the screen.3. Basic keyboard shortcuts
Most of the mc keyboard shortcuts fall in one of the following category:
- C-<chr>: Press Control key and a character key at the same time. For e.g. C-u to swap left and right panels.
- M-<chr>: Press Alt key and a character key at the same time. For Alt key commands, you can also press ESC key, release it and press the character key.
- S-<chr>: Press Shift key and a character key at the same time.
- C-<chr1> <chr2>: Press Control key and a character key at the same time, release it and press another character key again. For e.g. C-x d to compare directories.
Following are some basic keyboard operation
- Tab: To switch from one panel to another.
- M-t: Change the panel display options. i.e Switch from a dual panel display to a single panel display.
- C-s: Search for a file.
- Use up-arrow, down-arrow, page-up, page-down, home and end keys to browse the directory content.
4.Sample mc usage scenarios
- Copy multiple files together using 'Insert' and F5: Highlight a file and press 'Insert' key to tag the file for group selection. Repeat this process for multiple files that you wish to copy. Selected files will be displayed in a different color. Pressing F5 will display the following copy dialog screen, defaulting the destination directory location to the directory displayed in the other panel
Fig: Copy multiple files together using mc UI
- Display additional file information: To display additional file attributes in the directory panels, press F9 -> Left or Right -> Listing Mode, and select "Full File List"
- View the content of any compressed file using F3: Select the file and press F3 to view the content of the file. For e.g. Select a rpm file and press F3, to view the content of the rpm file.
- Toggle between command line and mc using C-o: Press C-o (Control key followed by o) to toggle between full command-line and mc user interface.
- Confirm file operations: To avoid mistakes, enable confirmation for copy, delete, overwrite and execute functions. Press F9 -> Options -> Confirmations, which will display the following screen.
Fig: Setup file operation confirmations
Google matched content |
Midnight Commander Cheat Sheet from Give Me Fish, LLC
Society
Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers : Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism : The Iron Law of Oligarchy : Libertarian Philosophy
Quotes
War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda : SE quotes : Language Design and Programming Quotes : Random IT-related quotes : Somerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose Bierce : Bernard Shaw : Mark Twain Quotes
Bulletin:
Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 : Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law
History:
Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds : Larry Wall : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOS : Programming Languages History : PL/1 : Simula 67 : C : History of GCC development : Scripting Languages : Perl history : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history
Classic books:
The Peter Principle : Parkinson Law : 1984 : The Mythical Man-Month : How to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Haters Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite
Most popular humor pages:
Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor
The Last but not Least Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D
Copyright © 1996-2018 by Dr. Nikolai Bezroukov. www.softpanorama.org was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) in the author free time and without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.
This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...
![]() |
You can use PayPal to make a contribution, supporting development of this site and speed up access. In case softpanorama.org is down you can use the at softpanorama.info |
Disclaimer:
The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.
The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. This site is perfectly usable without Javascript.
Last modified: September, 12, 2017