The popular console file manager mc is capable of handling Windows network resources (smb share) in the same way as it handles ftp/sftp. However, this feature is disabled by default. This article will describe how to add samba support to mc.
For this we need to rebuild the mc package. On Ubuntu/Debian (and later Ubuntu/Debian based operating systems) we will need to pre-install the required dependencies:
sudo apt-get build-dep mc
In Redhat (Fedora, Centos):
sudo dnf builddep mc
Next, you can download the mc source code from the official website, from some third-party sources, or you can clone it from the main github repository:
git clone https://github.com/MidnightCommander/mc
In that case, samba-enabled configuration, compilation and installation can be done with commands:
sudo make install
In Debian (and Ubuntu, Linux Mint, etc.), if you have src-repositories connected, you can build the installation deb packages:
apt-get source mc
Then use any text editor to open the
rules file in the
mc_smb/mc-4.x.xx/debian folder (where 4.x.xx is the downloaded version number) and lines:
You can then go to the source directory and build the new packages:
After a while the packages will be assembled and be found in the directory above, it can be reinstalled with the command:
sudo dpkg -i mc-data_4.x.xx_all.deb mc_4.x.xx_arch.deb
(where 4.x.xx is the build version number and arch is your CPU architecture)
Of course, you could also install the compiled mc package with your usual installer instead.
You can also download the patches and packages of a specific version of mc: https://github.com/zlaxy/mc.
It, unlike the official branch:
– there is a scrollbar in the active panels;
– pressing F3 on a directory counts and displays its size;
– Shift+F1/Shisft+F2 or F11/F12 open the menu of mountpounts with the hotlist (with ability to add network and smb addresses to it);