Midnight Commander: Installation, Update and Use MC. Installing MC - Midnight Commander Install Built-in utility for viewing files

Midnight Commander: Installation, Update and Use MC. Installing MC - Midnight Commander Install Built-in utility for viewing files

30.03.2021

Midnight Commander. - File Manager for Linux (as well as FreeBSD, UNIX), in appearance is very similar to Norton Commander, or Far (Perhaps the old good grandfather Norton not many remember ...). Of course, for full-fledged administration without knowing the * Nix commands, it is not necessary, but navigating directories, operations with directories, files, file groups, as well as viewing and editing files becomes much more convenient.

Midnight Commander is usually not installed by default, but check for a short time - score on the command prompt
mC.
If in response to the boring "Command Not Found" or something similar - everything is right. We will install.

Installing Midnight Commander on FreeBSD

1. Go to ports
CD / USR / PORTS / MISC / MC

2. Run the configuration
Make Config

In the window that appears, it is advisable to choose UTF-8 support (for properly displayed pseudographics)

3. Directly installing MC
Make Install Clean.

4. In the absence of errors, after the command
Rehash.
file manager Midnight Commander. You can run the team mC..

When installing from ports, all the necessary programs will be downloaded automatically.

Installing Midnight Commander on Linux

If you have a connection to the Internet, you can dial on the command prompt:
yum Install MC.

Installing Midnight Commander on Ubuntu or Debian

To install Midnight Commander on Ubuntu, first add sources (if there is no longer there) to the /etc/apt/sources.list file:

dEB http://archive.ubuntu.com/ubuntu/ Hardy Main Restricted Universe
DEB-SRC http://archive.ubuntu.com/ubuntu/ Hardy Main Restricted Universe

and directly installing MC

sudo Apt-Get Update
Sudo Apt-Get Install MC

If the sudo command is not found - you should run in the root (SU) input and install MC: (without updating the installation can end the error)

aPT-GET UPDATE
APT-Get Install MC

You know other ways installations Midnight Commander? Found a mistake? Unlock.

Original: Midnight Commander - A Console Based File Manager for Linux
Posted by: Pungki Arianto
Publication date: October 23, 2013
Translation: A. Krivoshi
Translation Date: May 2013

If you have to work with a large number of files in the console environment, then you can find such a job quite tedious. In the graphic environment there are file managers that help to increase the speed of working with files. You do not need to remember the name and syntax of each command associated with files.

In the console environment to work with files you need to know the main commands and their syntax. Fortunately, Linux also has a text file manager working in a console environment. It is called Midnight Commander (hereinafter we will call it just MC).

Section headers

The site Midnight Commander says:
"GNU Midnight Commander is a visual file manager distributed under the GPL license, and therefore it qualifies as Free Software. This is a powerful text full-featured program that allows you to copy, move and delete files and directories, search for files and run to execute the shell command. . Also included built-in editor and program for viewing files. "

How to install Midnight Commander in Linux

By default, MC is usually not installed. In Debian, Ubuntu and Linux Mint you can install it using the APT-Get command:

$ sudo APT-Get Install MC

In Rhel, Centos and Fedora you can use the command:

# yum install mc

After the installation is complete, simply enter "MC" (without quotes) in the console to start it.

Opportunities Midnight Commander

MC has a lot useful for both users and administrators, functions.

Copy, Delete, Rename / Move, Creating Directory

The MC interface is divided into two columns independent of each other. Each column represents an active directory. You can switch between them using the Tab key. At the bottom of the screen, you can see the buttons with numbers that belong to the F1 - F10 function keys.
To copy a file from one directory to another, simply select it and press "F5". To copy multiple files, you must immediately select them using the "Insert" key.

MC will ask you to confirm. To start copying, simply click OK.
Deleting files is even easier. Just select the files and click "F8". Moving files is performed using the "F6" keys.
However, the file renaming is slightly different. By pressing the "F6" key, you need to enter a new file name. An example of how this is done is shown below in the screenshot.

To create a directory, you can click "F7". MC will create a new directory in the current one. To find out what else MC can do with files, click "F9"\u003e File.

Built-in utility for viewing files

Many text editors are available in the console mode, such as VI, Joe and Nano. MC has its own built-in program to view the contents of text files. To start it, select the file and press "F3". You can also edit the file if necessary, highlighting it and pressing "F4".
When you run a text editor for the first time, MC will ask you to select the default text editor:

[Email Protected] ~ $ SELECT AN EDITOR. To Change Later, Run "SELECT-EDITOR". 1. / BIN / ED 2. / BIN / NANO

Then, when you press the "F4" key, MC will use the selected text editor. If you want to change the default editor, simply click "F2", you take "@" and enter "SELECT-EDITOR" (without quotes).

What if you want to use another text editor not detected by MC? Suppose you want to work with VI. This can be done differently. Find in your home directory ".selected_editor". This is a hidden file, so it starts from the point. Edit it as follows:

# GENERATED BY / USR / BIN / SELECT-EDITOR SELECTED_EDITOR \u003d "/ USR / BIN / VI"

File access rights

Files and directory have access rights that indicate who can read, record and execute files and directories. A command for managing access rights - chmod. To find out how it does not use, type in the terminal "MAN CHMOD".
In MC, you only need to highlight the file, then click "F9"\u003e File\u003e Chmod or "Ctrl-X" and "C". MS will show you the current permissions of the selected file and the parameters that can be changed.

Owner of the file.

Files and directories have their own owner, as well as the owner group. The owner privileges are managed using the chmod command described above. The owner management is carried out using the Chown team.
As usual, to find out how it does not use, type "MAN CHMOD" in the terminal. In MC you just need to highlight the file, then click "F9"\u003e File\u003e Chown, or "Ctrl-X" and "O". Now you can set the owner and the owner group from the list of available users and groups.

The MC also has the "Advanced Chown" function, which is a combination of chmod and chown, allowing you to perform the two tasks described above in one place. Click "F9"\u003e File\u003e Advanced Chown.

By default, MC has a two-channel interface. These panels are designed not only for local directories. You can connect them to a remote computer by FTP.
In this case, MC acts as an FTP client. To connect, you need to click "F9"\u003e FTP Link. MC will request data for connecting in the following format:

User: [Email Protected]_or_ip_address

If the entered data is correct, in one of the panels you will see a list of remote computer directories.

To disable FTP connections, you can click "F9"\u003e Command\u003e Active VPS Link. In the Active VFS directories list you will see your FTP connection. Select it and click "FREE VFSS". If you want to simply switch to the local directory without breaking the FTP connection, select "Change to".

If your network uses a proxy server, you can configure MC to work with a proxy. Click "F9"\u003e Options\u003e Virtual FS\u003e Always Use FTP Proxy.

Exit from Midnight Commander

To exit Midnight Command, click "F9"\u003e File\u003e Exit or "F10".

For a more detailed acquaintance with MC capabilities, Posted by Midnight Commander FAQ.

The operating systems of the Unix family are famous for their ghostly black screen, which for people far from the computer often may seem something wildly unearthly, in turn administrators who work for this object of spectacle - are representatives of some secret organization.
In general, a good plot that could have an exciting continuation. However, those who have had to face the administration of these systems, it seems at all the picture. CONSOLE MODE - In this mode, the multiple server servers continue to work, the main part of the administration of which is performed by the control console. Sometimes it is convenient to use file managers to work with the file system, about one of them - the most popular one of its kind for UNIX systems, we will talk here.

Midnight Commander. - A popular file manager that has a characteristic interface, as a rule of blue, similar to Norton Commander, or Far. If you have to work with similar programs, then you guess what we are talking about. The running file manager program occupies the entire work area. Visually interface is divided into two parts. Each of the parts displays the contents of the current directory, as well as brief information about files. Of course, the program can do all the basic things necessary for working with files.
Now about how to install Midnight Commander in the Linux CentOS operating system.

Installing Midnight Commander from the Internet

Attention, make sure you have access to the Internet, because This installation method provides for the existence of the Internet on your server.
For convenience, you can also familiarize yourself with software information. For example, you can check the sending of packets through the Ping utility. After that, you can proceed with the installation, perform the command:

# yum install mc

With the help of the package manager, all the necessary files will be downloaded in automatic mode. Then you will be asked to confirm your actions, after this procedure a file manager will be installed.

To start the program, enter the command in the command prompt:

Installing Midnight Commander with CD / DVD Disc

Everything seems to be beautiful, however, there are cases when there is no access to the Internet at hand, there is an installation disk with a distribution kit, what to do in this case? In general, the methods of installing packets in the Linux system set, and one of them is the ability to install from the disk. So, proceed. As you know, in order to use the CD / DVD disk in Linux, and in general, in the operating systems of the Unix family, it is necessary to make a "mount" of the device, in our case it is a disk drive. Mounting in the usual way to be made in the file system, in our case, we will be mounted in the directory that we will now create.
Create a directory:

# mkdir / media / centos

Mount the drive to the directory that you have just created:

# MOUNT / DEV / CDROM / Media / CentOS

We check whether our disc was successfully mounted:

# CD / Media / CentOS / # Ls

After entering the commands, the disk contents should be displayed, if any, then everything is as needed. After that, using the same installation:

# YUM --DisableRepo \u003d \\ * - MedaBlerepo \u003d C5-Media Install MC

Entering the command initializes the dependency check, after which it will also be asked about confirming the installation of an application, as in the previous method, installation from the Internet, then an installation will be made.

After that, you can connect 22 port via Putty to the server. As a username, you must specify the root, and the password from its administrator account. We go and see the usual black console:

I, although I know all the popular UNIX commands, I still prefer to use Midnight Commander or simply MC. There is no default in Synology and just put it so much. I first decided to download the sources, compile and install, as is usually done. But before that, I decided to google the question, maybe there is a way easier.

And he really is. To quickly and easily install MC on Synology, it is enough to simply connect an alternative repository through the control panel and install Midnight Commander. For this we go to Packet Center, Press Settings, open the tab Sources of packages And add a new one:

Name - SynoSmunity.

Location - http://packages.synocommunity.com.

Zhmem. OK. Everything. Now you can choose in the package list section Community And there to choose Midnight Commander, or something else, you need:

Now we go to the Synology console, write there 2 simple symbols mC.and we work in your beloved and familiar Midnight Commander.

By the way, inside everything is very curious arranged. It looks like a highly modified Rhel or CentOS. The server uses httpd as a Web server, but NGINX and PHP-FPM and PHP-FPM are installed on the system. The system is installed on the RAID1, built on the MDADM, which is included in the section from each disk in the system. Custom volumes on LVM. Maybe somehow there will be time and desire, I dig, I will tell you in more detail about the insides.

Online course Security Linux

If you have a desire to understand more detail in the configuration and security and network infrastructure, built on the basis of Linux, I recommend to get acquainted with online course "Security Linux" in Otus. Training lasts 3 months, after which successful graduates of the course will be able to interview partners. The course program is designed as a series of practical workshops and is focused on prepared listeners who already have knowledge and experience in the Linux administration. What will learn:
  • Apply the best world practices and IB standards (Debian, Redhat, Mitre);
  • Use means for detecting and operating vulnerabilities in Linux OS;
  • Install and configure network detection and prevent attacks;
  • Work with docker monitoring and containerization systems;
Check yourself on the introductory test and see more detailed software program.

Being a fan of bipoon file managers, I just could not pass by such a significant event! Midnight Commander, he MC after many years of idle updated to version 4.6.3. It made many beetles and cockroaches to joy to simple users. This is dedicated to this note.

It must be said that Midnight Commander is the heir to Norton Commander's traditions, so if someone misses the legendary bipoon file manager, he will find it in Linux his decent replacement in the face of Midnight Commander.

What has changed in the new Midnight Commander?
From the most striking changes: the illumination of the default file types has been changed, the old and very annoying bug "Interpreter is busy executing the command", displaying the amount of free space at the current point of mounting and just a huge number of other changes. The developers also promise in the near future to continue the hunt for bugs and combine all the accumulated patches so that many Midnight Commander beloved is still more beautiful.

In general, all this is worth updating the old-kind Midnight Commander. For some distributions there are assemblies, so you can download MC on the project page immediately in the form assembled for your Distribution. For those of us who like the author of these lines Uses Rock-Solid Debian Stable, assembling Midnight Commander from sources immediately into the package problem will not be. Just download a similar cut from here and give a few simple teams:

and we write that the package we collected ourselves, after which:
and we see how Midnight Commander is going for a few moments. The assembly must pass without problems, and the received Deb package is easy and simply set:
On this installation MC is completed, the existing Midnight Commander will be updated to version 4.6.3. After that, we recruit the usual MC and enjoy. Here's what Midnight Commander looks like in me:

Keyboard abbreviations MC.
To squeeze out Midnight Commander. Everything is worth remembering at least a few keyboard cuts that can greatly facilitate the task. Keyboard combinations B.Midnight Commander. Have a feature: combination Ctrl + x C means that you need to press Ctrl and X, let go and then press the C key.

So, some Midnight Commander key combinations:

  • Ctrl + R. updates the active panel;
  • Ctrl + x C View / change the rights (CHMOD) for marked files;
  • Ctrl + X Oview / change the owner (chown) for marked files;
  • Ctrl + S. or Alt + S. Opens the quick search dialog (input characters are not displayed in the command prompt, but in the search bar);
  • Ctrl + x a Opens the virtual file system dialog;
  • Ctrl+ \\ Called menu of frequently used directories.
  • Ctrl + X J Show all background tasks.
  • Ctrl + x T Send dedicated objects to the command line
  • Ctrl + X S Create a symbolic link (Symlink)
  • Ctrl + x Qquick view of the contents of the file on the second panel.
  • Ctrl + X Iquick view information about the current object on the second panel.
  • ESC + T or Alt + T Dashpiece (standard, shortened, advanced);
  • ESC + H or Alt + H Call the list of last commands completed;
  • Alt + G. Notes the first file or directory in the displayed list on the panel
  • Alt + R. Notes the average file or directory in the displayed list on the panel
  • Alt + J. Notes the last file or directory in the displayed list on the panel
  • Alt + O. The inactive panel enters the directory to which the active panel indicates.
  • Alt +.do not shown or show hidden files or directories.
  • Alt + Switch panel display mode (vertically / horizontally).
  • + (Plus) Calls a window to highlight a group of files (you can use regular expressions)
  • \\ (Backslash) shoots a marker with a group of files (action, the opposite of which
    called by key "+").
It should be noted that at least in version 4.6.3, keyboard combinations may not work if the Russian layout is turned off.

Application Association in Midnight Commander
For example, if you highlight the PDF file and press ENTER, the KPDF / EVINCE must start and open the PDF file. If this happens, we go to copy the settings file from / etc / mc and put it in V.MC / Bindings
The fact is that MC does not read the global config, about what people in the forums often do not write. So edit you need a local copy.

Also edit it can be directly inside MC: F9 - Command - Edit Extension File
and rules there are associations with file extensions.

Links
Now the main development of Midnight Commander goes

© 2021 Hecc.ru - Computer Technology News