Sunday, January 14, 2018

Using Midnite Commander on IBM i via SSH and Putty

If you used Norton Commander back in the day you probably remember this DOS utility with a side-by-side directory list.

It saved my life back in the early days of PCs.

I discovered Midnite Commander a few years ago which functions as a functional equivalent to Norton Commander in Linux.

There is also an AIX version so now that I have SSH working I thought I would give it a try.

It appears to work just fine. Very cool.

This will be useful addition when doing IBMi command line work via putty.

If you're using SSH and Putty to access the IBMi remotely check it out.

Listed below is a loose list of instructions for getting MC to work on your IBMi.

Create Local IBM i Copy of Perzl RPMs (replaced by OPS product)
http://youngiprofessionals.com/wiki/index.php/PASE/OpenSourceBinaries

Use the above URL and instructions to create a local IBMi copy of Perzl *.deps tree for use with the wwwperzl.sh script.
Thw wwwperzl.sh script will help you download and install AIX binary builds and dependencies to your IBMi PASE environment from the Perzl AIX site.

Installing Midnite Comander from a PASE Command Line

Once the Perzl RPM items have been resolve run the following steps from a PASE or SSH putty terminal.

Note: make sure the updated wwwperzl.sh and setup2.sh files have been installed and setup2.sh has been run prior to trying the next steps.

Start the PASE command line or log in via SSH and Putty 

call qp2term    --enter the PASE command line

cd /QopenSys/download  --Change to wwwperzl.sh location

List to see if Midnite Commander is available
./wwwperzl.sh aix61 list mc-4.7.0.4-2.aix5.1

Download Midnite Commander via wget
./wwwperzl.sh aix61 wget mc-4.7.0.4-2.aix5.1

Install Midnite Commander
./wwwperzl.sh aix61 rpm mc-4.7.0.4-2.aix5.1

Create symbolic link for all users to use MC without path
ln -sf /QOpenSys/opt/freeware/bin/mc /QOpenSys/usr/bin/mc

Now you can simply log in to putty or other SSH terminal session and type:
mc or mc -c to use Midnite Commander. 

Run Midnite Commander

Black and white mode
/QOpenSys/opt/freeware/bin/mc

-or-

mc

Color Mode
/QOpenSys/opt/freeware/bin/mc -c

-or- 

mc -c

Now start enjoying Minite Commander.

You'll find it very easy to navigate the IFS, browse or edit text files right from the IBMi system,


Midnite Commander User Interface

Update for January 2022

Now it's as simple as using yum to install Midnite Commander from a PASE command line if you have the IBM Open Source Package Management installed on your IBM i system.

yum install mc




No comments: