Как установить mc в Ubuntu 20.04
Midnight Commander или mc известен каждому пользователю Linux. По сути, это аналог другой программы — Norton Commander и более современного FAR Manager. Он обладает всеми традиционными возможностями типичного двухпанельного файлового менеджера.
Несмотря на явно несовременный дизайн, Midnight Commander всё же довольно мощный инструмент. Он поддерживает Samba, FTP и SFTP, умеет работать с архивами и образами как с обычными директориями. В этой статье будет рассмотрено, как установить Midnight Commander в Ubuntu 20.04 Focal Fossa.
Установка mc в Ubuntu 20.04
1. Установка mc через терминал
Технически установка mc в Ubuntu не представляет никаких проблем. Необходимо открыть терминал и ввести следующую команду:
sudo apt -y install mc
Программа устанавливается из стандартного репозитория Ubuntu и через несколько секунд уже готова к работе. Для запуска программы необходимо в терминале ввести команду:

2. Установка из deb-пакета
Так же установить mc можно при помощи deb пакета. Для этого скачайте deb файл программы mc при помощи утилиты wget (предварительно убедитесь, что у вас присутствует программа wget, при её отсутствии сначала установите её) выполнив следующую команду:

Для установки при помощи утилиты dpkg необходимо выполнить команду:
sudo dpkg -i mc_4.8.27-1_amd64.deb
Однако данный способ не рекомендуется использовать так как во время установки программа dpkg сообщит что у пакета mc отсутствуют некоторые зависимости:

Данная ошибка связана с тем, что dpkg является низкоуровневой утилитой и не умеет работать с зависимостями так как «не смотрит» в интернет для поиска зависимостей. Для исправления ошибки необходимо подтянуть недостающие независимости при помощи утилиты apt выполнив следующую команду в терминале:
sudo apt install -f

Ключ -f (сокращение от fix broken) в данном случае устанавливает необходимые зависимости и самостоятельно завершает установку программы. В данном случае после того, как все необходимые зависимости будут установлены apt так же установит mc. Для запуска программы необходимо в терминале ввести команду:

Выводы
Как видно, установка Midnight Commander Ubutnu является одной из наиболее простых операций. Конечно, она не дотягивает по простоте до MacOS — просто перетянуть установочный пакет, однако всё же весьма проста.
Похожие записи
Оцените статью
alt=»Creative Commons License» width=»» />
Статья распространяется под лицензией Creative Commons ShareAlike 4.0 при копировании материала ссылка на источник обязательна .
Об авторе
24 комментария к “Как установить mc в Ubuntu 20.04”
))))) Точно также можно писать статьи по установке любой другой программы для Linux, которая устанавливается одной командой! А где хотя бы поверхностный обзор, для приличия? Я вам сейчас таких триста статей «наплюю» за час! Надо хоть какое-то к людям уважение иметь )))
«Как поменять обои в Ubuntu 18.04 Bionic Beaver»
«Как сменить тему в Ubuntu 18.04 Bionic Beaver»
«Как увеличить громкость звука в Ubuntu 18.04 Bionic Beaver»
«Как уменьшить громкость звука в Ubuntu 18.04 Bionic Beaver»
«Как очистить корзину в Ubuntu 18.04 Bionic Beaver»
и сотня прочих подобных тем, только на LOSST.RU
Юрий, «не плюйтесь», не мешайте Автору делать Своё дело.
А я и не плююсь! Просто на прошлых ветках многие «ругались» на сайт, что его уровень упал. Я был не согласен, а теперь вижу, что это так! В чем автор сделал свою работу? Описал одну стандартную команду и разместил 2 скриншета? Так точно также устанавливается миллион других программ! Где работа автора? Где хоть какая-то информация по этой программе, как с ней работать, какие комбинации клавишь. да уйма чего! Это, простите, не работа, а халтура! У меня так один знакомый число статей набирает для устройства на работу! Ему именно число важно ))) Без обид! Просто ждешь-ждешь чего-то стоящего, по сто раз в день заходишь, счетчики сайту накручиваешь, а тут . )))))
И смысл этой статьи? Лучше бы написал для новичков, как потом mc.ini фаршировать под свои хотелки новичкам. Оно, конечно, на данный момент более менее под повседневные задачи настроено по-дефолту, но есть же специфический софт и типы файлов, которые этим софтом открывать нужно.
Методика установки любой программы в Archlinux
Воспользуемся штатной программой «pacman»
Набираем в консоли pacman -S *
Вместо «*» пишем устанавливаемую программу. и вуаля! Программа установлена
Т.К. для установки программ требуется права root, не забываетй об этом.
Ну вот пожалай и все, теперь вы гугу по установки программ! ))))
она не дотягивает по простоте до MacOS — просто перетянуть установочный пакет
перетягивальщики. креста на вас нет. куда уж проще написать в терминал простую команду?! даже руки с клавы снимать не надо. нет, надо перетягивать. кто вас только учит мышом возить по экрану. правильно Кирюха матерился на вас. :((
на хабре пишут как du пользоваться, тут как mc установить. дожили
(И вдобавок умеет работать на серверах, где отсутствует графическое окружение. Это позволяет удобно управлять файлами ///прямо в терминале////.) Так в терминале, или в Midnight Commander? Это — разные веСЧИ
или я ошибся, по поводу терминала? https://losst.pro/komandy-linux-dlya-raboty-s-fajlami
админы, вы хоть следите за статьями?
Программы в Linux делятся на две категории:
1. Программы, которым для запуска и исполнения достаточно текстовой консоли.
2. Программы, которым для запуска и исполнения необходим X-сервер.
Midnigth Commander относится к программам первой категории, он не требует X-сервера, поэтому им можно пользоваться прямо в терминале, здесь автор прав. При этом в отличие от программ из состава coreutils, предполагающем ввод текстовых команд для выполнения пользовательских действий с файлами и каталогами, Midnigth Commander предоставляет псевдо-GUI для выполнения пользовательских действий, что позволяет не запоминать специфические команды и наборы ключей к ним, поэтому этот файловый менеджер и ценится некоторыми пользователями и админами. На мой вкус c coreutils работать быстрей и удобней, но для него требуется предварительная теоретическая подготовка. И coreutils и Midnigth Commander — это работа в терминале. Прекратите уже прессовать автора на этот счёт. :)))
Автор 3.14здит. Нет mc по умолчанию в Ubuntu 18.04.01.
Негодная статья. Не работает так.
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION=»Ubuntu 18.04.1 LTS»
# apt install mc
Reading package lists. Done
Building dependency tree
Reading state information. Done
Package mc is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package ‘mc’ has no installation candidate
А как работает кто-нибудь в курсе или не?
Нужно влкючить дополнительные репозитории, а то в последнем релизе включены только основные.
Я просто включил все поддерживаемые каноникал файле /etc/apt/source.list делаем так:
deb http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse
Выполни:
sudo apt update
а затем и повтори команду по установке:
sudo apt install mc
СПАСИБО тебе, ДОБРЫЙ человек
Всё заработало!
Смогли всунуть таким образом:
1. Установили с флэшки deb пакет с МС, получили сообщение отсутствие связи с libssh2-1-dev и ещё 1-2 связки. Установили этот связанный libssh2-1-dev и ещё 1-2 связки с флэшки, после чего сработала команда apt-get install -f и докачала остальные зависимости с репозитория. Если попытаться применить команду только после установки пакета МС — она его полностью убирает. Способ плохой, но лучше чем собирать самому все зависимые пакеты (инфа по пакетам была отсюда https://launchpad.net/ubuntu/bionic/+source/mc).
статья ни о чём.
это я, как полнуй нуб, в линухе говорю.
нет у меня графического интерфейса — 2-й вариант или отпадает или тема не раскрыта
1-й вариант не работает принципиально.
ЗЫ да и смысл в МС если есть графический интерфейс?
Смысл данной статьи в том
если мне надо установить в ubuntu mc то я пишиу в google ubuntu mc install и попадаю на эту статью где в двух скриншотах и паре предложений мне все показали за что автору спасибо.
первый вариант работает 100% в ubuntu 18.4. Единственно что надо было написать что этот вариант будет работать если есть подключение к интернет.
How To Install mc on Ubuntu 20.04
In this tutorial we learn how to install mc on Ubuntu 20.04.
What is mc
GNU Midnight Commander is a text-mode full-screen file manager. It uses a two panel interface and a subshell for command execution. It includes an internal editor with syntax highlighting and an internal viewer with support for binary files. Also included is Virtual Filesystem (VFS), that allows files on remote systems (e.g. FTP, SSH servers) and files inside archives to be manipulated like real files. Description-md5: 252a5c5aeeb7425db45357d4ab8aa55f
There are three ways to install mc on Ubuntu 20.04. We can use apt-get , apt and aptitude . In the following sections we will describe each method. You can choose one of them.
Install mc Using apt-get
Update apt database with apt-get using the following command.
After updating apt database, We can install mc using apt-get by running the following command:
Install mc Using apt
Update apt database with apt using the following command.
After updating apt database, We can install mc using apt by running the following command:
Install mc Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.
After updating apt database, We can install mc using aptitude by running the following command:
How To Uninstall mc on Ubuntu 20.04
To uninstall only the mc package we can use the following command:
Uninstall mc And Its Dependencies
To uninstall mc and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
Remove mc Configurations and Data
To remove mc configuration and data from Ubuntu 20.04 we can use the following command:
Remove mc configuration, data, and all of its dependencies
We can use the following command to remove mc configurations, data and all of its dependencies, we can use the following command:
References
Summary
In this tutorial we learn how to install mc package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.
Как установить Midnight Commander (MC) в Ubuntu 18.04
Однажды после установки Ubuntu Server 18.04, при попытке установить Midnight Commander отобразилось сообщение что не найден пакет для установки.
Чтобы решить проблему, необходимо добавить Universe репозиторий:
После этого Midnight Commander должен успешно установиться:
При необходимости репозиторий Universe можно отключить так:
Смотрите на видео как я установил Midnight Commander (MC) в Ubuntu 18.04:
How to Get Started with Midnight Commander in 2022
Get a new level of security for your M365 data with immutable backup copies on any object storage. Try the new Veeam Backup for M365 v7.
Table of Contents
Managing files and directories on a computer may seem relatively easy, but you should perform the task with caution. Bear in mind that one wrong move, and you can mess up your applications or, worse, your entire system. If you still haven’t found a visual file manager to help you with file management tasks, Midnight Commander is a good find and a must-keep.
You don’t find many visual file managers for the Linux terminal, but one that has been around for many years is Midnight Commander. And in this tutorial, you’ll walk through getting started with Midnight Commander and smoothly manage your files and directories.
Read on and keep your files organized with Midnight Commander!
Prerequisites
This tutorial will be a hands-on demonstration. If you’d like to follow along, be sure you have a Linux system. This tutorial uses Ubuntu 20.04 LTS, but any modern Linux distribution will work.
What is Midnight Commander?
Managing files on their Linux servers in a command-line environment may seem daunting, time-consuming, and even dangerous. Well, not until you get to know Midnight Commander. But what is Midnight Commander anyway?
Midnight Commander makes working with files in the Linux terminal much easier and faster. But what about features? Midnight Commander includes a two-panel view, drag-and-drop, built-in file viewer, and editor — all you need for file management.
Another beauty of Midnight Commander is that it’s compatible with almost all Linux Bash shells and SSH clients and lets you remotely manage files on another computer! Even better? When using Midnight Commander with an SSH client, you’ll have all the features and functions of a GUI file manager.
Installing Midnight Commander
Even though Midnight Commander is available in default repositories of most Linux distributions, Midnight Commander doesn’t come installed by default.
Before running commands to manage your files, you’ll first have to install Midnight Commander on your machine.
1. Run the apt update command below to update the local package index.

Update the local package index
2. Next, run the apt install command below to install Midnight Commander (mc) on your machine.

Installing Midnight Commander
3. Finally, run the below command to verify Midnight Commander’s installed version.
Below, Midnight Commander’s version installed is 4.8.24, but yours may be different. This output confirms that you’ve successfully installed Midnight Commander.

Verifying Midnight Commander’s Installed Version
Launching and Navigating Midnight Commander
After installing Midnight Commander, you might want to look around before jumping into any file manipulations. And obviously, you need to launch Midnight Commander first.
1. Run the mc command to launch Midnight Commander in your terminal.
You’ll see a Textual User Interface (TUI) similar to the following in your terminal. In computing, a textual user interface relies on text commands. A TUI is usually on a command-line interface (CLI) but may also use menu-driven interfaces and other forms of input devices.
A text-based interface can be faster and more efficient than a GUI, especially for tasks performed regularly or requiring a lot of typing. These features keep text-based interfaces in use today, particularly in Unix-like operating systems.
By default, Midnight Commander uses a blue background color. The developer used this color to make the interface look like Norton Commander, a popular DOS file manager from the 1980s. But seeing too much bright colors can hurt your eyes. So why not turn it off?

Launching Midnight Commander
2. Press F10 to quit the colored interface and return to your terminal.
3. Now, rerun the mc command below appended by –nocolor option to use a black and white color scheme for the Midnight Commander’s interface.
As you can see below, Midnight Commander’s interface is now all black and white — suits the name “Midnight.” More comfortable in the eyes, right?
The first thing you’ll notice is the two vertical panes. With either of the two panes, you can view the contents of the file system, list of files, or show a directory tree. You can use the Tab key to switch or click on either pane.
Why two panes? The two-pane layout allows you to work with two different directories simultaneously.
4. Use the arrow keys to navigate up and down the directory listing in either pane, and press Enter to open the selected directory, as shown below.
5. Press the F9 key to select an item in the menu bar. Likewise, you can use your mouse to click on a menu item just like you would with any other graphical interface. Some users prefer this method as it can be faster than using the keyboard.
Below, you can see the menu item gets highlighted in black.

Accessing the Menu Items
At this point, you can launch a program, copy or move files, search for text, change the user interface settings, and more using your left and right arrow keys to move. You can think of each menu item as a command in Midnight Commander.
6. Lastly, press the Left or Right arrow keys to highlight any menu items and press the Down arrow key to open the sub-menu. But if you click on the menu item, the sub-menu opens up right away.
Viewing and Editing Files
You’re now familiar with navigating Midnight Commander’s interface. So now it’s time to apply what you learned to work with managing files. For a start, you’ll view and edit a sample text file.
1. Run the below command at the Midnight Commander’s subshell (bottom). This command doesn’t provide output but creates a test.txt file in your working directory. You’ll use this file to test the menu items.

Creating a Test File
2. Next, navigate back to Midnight Commander, and you’ll see the newly-created file (test.txt).

Verifying the newly-created file (test.txt)
3. Open your newly-created file in any of the two ways below:
- Using your mouse, click on the test.txt file —> File menu —> View.
- Using your keyboard, press the down arrow or up arrow keys to highlight the test.txt file and press F3. A text viewer will open the contents of the file.
4. Now, press the Q key to exit the text viewer, select the file again and press F4 this time to edit the file, and Midnight Commander opens your file in your default text editor.
If you don’t have a default text editor set up, you’ll be asked to choose one the first time you try to edit a file, as shown below. But this tutorial uses the nano text editor (1).

Choosing the Default Text Editor
5. Make any changes as you like in your text editor, save the file, and close the editor.
6. Finally, select your file again, press F3 to see if the changes you made reflect on the file, and press F10 to exit from Midnight Commander.

Verifying changes are saved
Managing Files and Directories
Opening and editing files are not all you can do with Midnight Commander but also managing files and directories. You’ll copy, move, delete, and create files and directories for this tutorial to see how the process works in Midnight Commander.
1. Run the following command on your terminal to open the /tmp directory in both panes of Midnight Commander (mc).

Opening the /tmp directory in both panes of Midnight Commander
2. Next, press F7, enter a name directory name, and press Enter to create a new directory. For this tutorial, the new directory is called test.

Creating a new directory (test)
3. Run the following commands while in the Midnight Commander’s prompt, as shown below, to create text files (ata<1..5>.txt) inside the test directory.
Below, you can see the newly-created files in the /tmp/test directory.

Verifying newly-created text files
4. Click on the ata1.txt file with your mouse, and press the Insert key five times (depending on how many files you’ll copy) to select all the text files.
Press F5, enter the destination directory, in this case, the /tmp directory, and press Enter to copy the text files you selected.
5. Finally, click on the back button (top-left) to navigate the /tmp directory.

Navigating back to the /tmp directory
Below, you can see the text files you copied from the /tmp/test to the /tmp directory.

Verifying the copied files
Performing Time-Saving Tricks
You’ve learned the basics of managing files in Midnight Commander, but it’s never too much to invest for more time-saving tricks up your sleeves.
Perhaps you’re at the bottom of a directory tree, and you want to go up one level (the parent directory). Typically, you’d scroll to the top of the file listing until you meet the /.. entry and press Enter. This process works but can be tedious if you have many files in the current directory.
Enable the Lynx-like motion option to instantly navigate back to the parent directory — smooth, huh? This option is a special feature in Midnight Commander that simulates how the Lynx web browser moves around web pages. You’ll set the left (back) and right (forward) arrow keys to move up and down the directory tree.
1. Enable the Lynx-like motion option with the following:
- Press F9, followed by O and P keys which translates to accessing —> Options —> Panel options menu.
- Use your arrow keys to select the Lynx-like motion option on the Panel options window, and press the Space key to enable the option.
Or tick the box in front of the Lynx-like motion option to enable it.
- Press Enter to save the changes.

Enabling the Lynx-like motion option
2. Next, highlight a directory, press the Right key to access that directory, and then press the Left key to navigate back to the previous directory. Makes your life easier.
3. Highlight a compressed file, and press Enter to view the compressed file’s contents. This shortcut lets you quickly view the contents of a compressed file without extracting anything.
4. Finally, press the Ctrl+Space keys to quickly know the size of all directories in the current directory. This feature can be useful when you want to see how much space a directory is taking up on your hard drive.
Conclusion
In this tutorial, you’ve learned to navigate the Midnight Commander and the basics of managing files and directories on your system. You’ve learned some time-saving tricks, and even if they look so basic, small tricks still have a big impact in the long run.
GUIs truly look pretty and all, but Midnight Commander can still keep up with the demands of file management with speed and simplicity.
To level up your newfound knowledge, why not try changing permissions or owners of files and directories with Midnight Commander? Or perhaps, create symbolic links (symlinks)?
Hate ads? Want to support the writer? Get many of our tutorials packaged as an ATA Guidebook.
More from ATA Learning & Partners
Recommended Resources!
Recommended Resources for Training, Information Security, Automation, and more!
Get Paid to Write!
ATA Learning is always seeking instructors of all experience levels. Regardless if you’re a junior admin or system architect, you have something to share. Why not write on a platform with an existing audience and share your knowledge with the world?
ATA Learning Guidebooks
ATA Learning is known for its high-quality written tutorials in the form of blog posts. Support ATA Learning with ATA Guidebook PDF eBooks available offline and with no ads!