Make Midnight Commander to exit to its current directory

Midnight Commander

Midnight Commander home page
MC it is a file manager based on the venerable Norton Commander. By default, MC does not remember its parent working directory. To correct this use the following method.

For root user edit /root/.bashrc and add the following line:

alias mc=". /usr/share/mc/bin/mc-wrapper.sh"

For others users, .bashrc files are located in /home/"username".
File location depends on the distribution you use (e.g. in Gentoo, Suse, … is /usr/libexec/mc/; in CentOS, Fedora, Ubuntu, … the path it is /usr/share/mc/bin/).
Restart your shell to view the change.

Make Midnight Commander to exit to its current directory
Make Midnight Commander to exit to its current directory
Tagged on:         

Leave a Reply