Midnight Commander - The Essential Root TUI File Manager

I rarely ever open a topic on the Garuda forum, but I felt compelled to do so today. I figured I needed to give a plug to one of the most underappreciated apps in all of Linuxdom. Midnight Commander is an old school dual pane Terminal User Interface (TUI) File manager in the style of Norton Commander. You’ve probably never heard of that program unless you started your computing career on a monochrome monitor, (yes that’s a thing, you can google it). Despite it’s dated appearance Midnight Commander is still one of the most powerful file managers in existence. You may think this is sheer hyperbole, but I kid you not.

Midnight Commander (MC) has saved my a$$ more times than I can count in many different ways. Now that Garuda uses snapper I figured it was finally time to clear out years of old TimeShift backups. I started out trying to delete the backups using Dolphin’s “Root Actions” plugin, with zero luck. Every time I tried to delete one of the top level directories I’d get an error that some deeply nested file couldn’t be deleted, (and there were lots of them). Even when I located the offending files and attempted to remove each file individually Dolphin still couldn’t delete them using root perms. So, I gave up on that idea before too long as Dolphin was basically useless.

My next attempt was with using the Konsole terminal emulator. If I tried to delete some of the topmost directories using Konsole, it still errored out. However, If I drilled down to the directory that contained one of the problematic files, I could delete that single directory using the terminal. It took me quite a long time to simply delete one days worth of saved backups using Konsole, and there were years of backups stored there. I quickly realized it would take a month of Sundays to purge the backups at this rate and gave up using Konsole in frustration.

I figured my last option before attempting to delete the backups using a rescue disk from a live environment was to put Midnight Commander to the test. Well as you might have guessed from my glowing tribute earlier, Midnight Commander has proved its easily up to the task. Midnight Commander successfully deleted over 1.7 million files and recovered over 1TB of space without a single error. This is by no means a one off, many times in the past MC has managed to accomplish tasks that seemed impossible using other methods. The surprising part is that even though MC runs in the terminal it is almost as easy to use as any modern GUI file explorer. MC has full mouse support and can traverse directories upwards and downwards with a double click. Midnight Commander even has its own powerful built in text editor, so if your system won’t boot properly MC is usually the only tool you’ll need to repair your system.

It never ceases to amaze me at how easily MC handles tasks that many standard tools choke on. MC looks a little outdated at first glance, but you can always spruce her up with a different skin to improve the looks. I usually launch MC with a blue skin for a limited user, and use a red skin when operating as root for an added margin of safety. That way it’s always readily apparent when you’re running as root. Enter sudo mcin your terminal to launch Midnight Commander as root, a simple mc will do to start Midnight Commander as a limited user.

Give Midnight Commander a try and you may be very pleasantly surprised at how effortless managing files in the terminal can be.

13 Likes

Redundancies are good for critical things like file management. Some months ago Dolphin had some nasty bugs, and for some people it wouldn’t launch for a period of time. I used the GUI twin-panel file manager krusader instead for that small amount of time.

I was real close on trying Midnight Commander though considering how much I’ve heard about it on these forums.
After this kind of glowing review, I will have to really check Midnight Commander out soon though :grin:

5 Likes

Nice revue @tbg
I think its one off the best terminal programs out there. Its the first program i install on a new system :grinning:

4 Likes

It doesn’t hurt to keep a terminal based internet browser such as elinks installed too.

If you only keep one full fledged browser installed it can come in handy if you have an extreme meltdown. I haven’t had to use it in quite some time, but it’s always on every machine just in case. :crossed_fingers:

2 Likes

I haven’t looked at Midnight Commander in years cause typically if Rootactions and or Open As Administrator doesn’t do the trick I use Thunar as root. After the above I do believe it’s time to give MC another look. Thanks

1 Like

I love MC though i install superfile as well now days i use w3m for browsing but i do like elinks as well. if you have used kitty ive also tried GitHub - chase/awrit: A full graphical web browser for Kitty terminal with mouse and keyboard support full browser in terminal.

But great write up on MC!

3 Likes

Did not realize this was still around, used to use it in the way back days of dos 3.3.

will have to get it again, always nice to have something that runs in a terminal.

2 Likes

I thought I’d pass along some tips on how to start Midnight Commander exactly the way you prefer it.

The best way to start Midnight Commander is with a bash alias with the options preconfigured to your liking.

Here’s an example with different options specified at launch:

su -c "konsole --hide-menubar -e mc -S /usr/share/mc/skins/modarcon16root-defbg.ini / /run/media/htpc/1TB-SSD/linux_files/  > /dev/null 2>&1 & disown"

Launch Midnight Commander:

As root:

su

In the Konsole terminal for a very clean look:

konsole --hide-menubar -e

Preselect the skin you prefer to run as root:

/usr/share/mc/skins/modarcon16root-defbg.ini

Preselect the directory you want the second pane to open in, (the first pane defaults to /root):

/path/to/most/used/dir/

It’s that easy, have fun.

5 Likes

Nice, I just added alias mcroot 'sudo mc -C --colors=red' to my fish config. No mistake on when I’m using root


Normal

Root

5 Likes

Wow you just burnt my eyes out :grinning:

6 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.