Installing Midnight Commander (mc) on Synology storage


Installing Midnight Commander

The easiest way to install mc is by using ipkg. If you have not already installed ipkg see Overview on modifying the Synology Server for details on how to do so.

Once you have installed ipkg on your NAS you can install mc using the CLI command „ipkg install mc“. As ipkg installs mc it should also automatically install (if not already installed) the three other programs mc requires (glib, slang, e2fslibs). These other programs are called dependencies because mc is dependent on them being installed for it to work.

What to do if ipkg does not install mc’s dependencies

In rare cases the person that built the „mc installation package for ipkg“ may have forgotten to tell ipkg that mc also requires glib, slang, e2fslibs. If so then ipkg will not install these dependencies and you will need to do so manually using the following CLI commands …

Ipkg install glib Ipkg install slang Ipkg install e2fslibs 


Configuring mc

  • After installing mc you need to edit the .profile file located in /root directory type: cd /root
  • Now type: vi .profile this will get you the vi editor
  • Add the following lines in the .profile (if you are unfamiliar with vi see Linux_vi_Editor)
export TERMINFO=/opt/share/terminfo  export TERM=xterm alias mc="mc -c"
  • This will allow you to use the F keys in Midnight Commander and turn on color mode.



  • Now you need to reboot the NAS, type: reboot
  • After rebooting reconect to the CLI and type: mc
  • If everything is setup right Midnight Commander will open in color mode with the F keys working.
  • If you use putty to SSH/Telnet into the CLI your mouse should work when you open Midnight Commander also.


Installing bootstrap (ipkg)


Installing compiled/binary programs using ipkg

To make the installation, update and removal process of software easier the computing industry adopted the principle of the Package Management System. ipkg is a dpkg-inspired, very lightweight Itsy Package Management System for small Linux systems and embedded devices, such as the Synology Servers. ipkg is often the easiest and most reliable way to install compiled binaries. Additionally ipkg will only use specified sources for binary packages, these sources are processor specific. Consequently you do not need to worry about „What kind of CPU does my NAS have“ when selecting a program/package to install, ipkg will effectively do this for you.

As Synology products do not currently come with ipkg installed the installation of ipkg is often the first recomended step to install binary/compiled programs/applications.

How to install ipkg

ipkg is also dependant on a few other software bits and pieces that are not installed on the synology servers. Consequently to install ipkg you need to use the appropriate bootstrap which automates the installation of ipkg and the other packages it needs.

After you have installed ipkg (see the bootstrap section below), you can install ipkg packages of programs using the command „ipkg install xxxx“ where xxxx is the name of the package. Once the package is installed you can run it using „xxxx“ where xxxx is the name of the program you just installed (this is normally the same as the package name, but not always).

For help with ipkg commands use „ipkg -help“.


A bootstrap is a script that installs ipkg. The bootstraps are specific to the processor in your Synology Server, so make sure you use a compatible one, see What kind of CPU does my NAS have.

You may want to check the forum to see if there are any latter bootstraps than those given below. However the ones below have been widely used and are known to work. If you are an experienced linux user the page How to Install Bootstrap gives clear instructions how to install ipkg, you may find it more concise and therefore quicker to follow than the more detailed information provided below for beginers.

Popular Bootstraps are:

For Intel XScale FW IXP420 BB ARM Processor which uses as its feed.

For Intel Atom CPU’s: D410, D425, D510, D525 and D2700 Processors which uses as its feed.

For 8241 PPC models which uses as its feed.

For 8533 PPC models – Please use the bootstrap for the 8543 PPC CPU (see below). That bootstrap is compatible with both 8533 and 8543 CPU’s

For 8543 PPC models which uses as its feed.

For mv5281 ARM models which uses as its feed.

For Marvel Kirkwood mv6281 ARM models which uses as its feed.

For Marvel Kirkwood mv6282 ARM models (which are compatible with the mv6281 for as far as we can tell) a modified syno-mvkw-bootstrap_1.2-7_arm.xsh with a bit more relaxed CPU checking: which uses as its feed.

For Freescale PowerPC QorIQ P1022 – Please use the same boostrap as for 8543 and 8553 PPC CPUs. Since they are all e500 CPUs, they share the same compiled binaries.

The steps to install the bootstrap (provided as .xsh files) are below, you should replace the text in bold with the relevant text for your CPU’s bootstrap file (listed above).

  1. Reboot your NAS.
  2. Enable and then Login to the Command Line Interface as user „root“, password is the same as for admin.
  3. Change to a directory such as „/volume1/@tmp“, i.e. enter the command „cd /volume1/@tmp“
  4. Get the NAS to download the bootstrap, e.g. if you have an mv5281 ARM model enter the command „wget„, alternatively download the bootstrap to your PC and then copy it to a shared folder on the NAS
  5. Set the .xsh script to be executable „chmod +x syno-x07-bootstrap_1.2-7_arm.xsh
  6. Now run the .xsh script, e.g. if you have an mv5281 ARM model and used the bootstrap above enter the command „sh syno-x07-bootstrap_1.2-7_arm.xsh
  7. After the script has finished you can delete the script file, e.g. for mv5281 ARM users using the bootstrap above enter the command „rm syno-x07-bootstrap_1.2-7_arm.xsh
  8. NEW: If you have DSM 4.0 there is an additional step. In the file /root/.profile you need to comment out (put a # before) the lines „PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin“ and „export PATH“. To do this enter the command „vi /root/.profile“ to open the file in vi. Now change vi to edit mode by pressing the „i“ key on your keyboard. Use the down cursor key to move the cursor to the start of the line „PATH=/sbin…“ and put a „#“ infront of this line so it is now „#PATH=/sbin…“. Do the same for the line below so it is now „#export PATH“. Now press the escape key (to exit edit mode) and type „ZZ“ (note they are capitals) to tell vi to save the file and exit. For background info on why this is neccessary for DSM 4 refer to

    (Alternatively, you can modify the PATH statement by prepending the existing $PATH. You can do this in vi by typing the following while in command mode: „:%s/PATH=/PATH=$PATH:/“ and then „ZZ“ to save and exit (or ESC and then „:q!“ to quit without saving if you made a mistake.))

  9. Note 1: If you have the following error: „Cannot satisfy the following dependencies for wget-ssl: libidn“, you need to manually download libidn and install with ipkg: Eg. for Synology DS108j: „wget“ (wget should be already present on the system) and enter the command „ipkg install libidn_1.21-1_powerpc.ipk„. Run the ipkg bootstrap process again (press yes when it asks to overwrite config file). For a procedure to install ipk packages without ipkg, see
  10. Note 2: When you have an error that /opt cannot be mount, unmount the previous mount („umount -f /opt“ check with command „mount“) and delete both old /opt and /volume1/opt folders.
  11. Reboot the NAS and login again to the Command Line Interface as user „root“
  12. Update the ipkg list of available packages using the command „ipkg update“
  13. Note 1: When „ipkg update“ fails, it can be that the older existing wget is used. Ensure that the right paths are selected in classpath with „$PATH“, if not: „export PATH=$PATH:/opt/bin:/opt/sbin“. Install wget manually: for Synology DS108j: „wget“ and „ipkg install wget_1.12-2_powerpc.ipk„. Check version with „/opt/bin/wget -V“. Check location with „which wget“.
  14. Upgrade any ipkg installed packages to the latest versions using the command „ipkg upgrade“
  15. Finished, you can now install ipkg packages using the command „ipkg install xxxx“ where xxxx is the name of the package. You can list all the available packages using the command „ipkg list“. As this is a long list you can filter it using the command „ipkg list | grep xxxx“ where xxxx is the text you want to search for. Alternatively, you view one page at a time using the „more“ pipe, e.g. „ipkg list | more“

Note: ipkg expects to find your ipkg files/programs in the path „/opt“. As the synology NAS’s put all your files in „/volume1“ the bootstraps put your IPKG files/programs in „/volume1/@optware“ but then mount this directory so it ALSO appears as „/opt“. Hence, do not think that „/volume1/@optware“ and „/opt“ are duplicated files, they are not duplicated, they are in fact exactly the same directory.

For Profil:

Installing Midnight Commander (mc) on Synology storage