Informing the IBM Community

Nano – A Great Open-Source Editor

5
(2)

In this article I show you how to use a great editor called Nano for any editing we have to do with files on our IFS.

Yes, I can hear half the readers screaming ‘I can use Rational Developer for i!’ and the other half of the readers shouting, ‘I can do that with VS Code!’ and I can hear all the PDM/SEU programmers keeping quiet as they would say ‘Nothing to do with me! I’m an RPG programmer!’

Yes, I have heard them all over the years!

Nano is a great editor for those quick edits we always need to do to configuration files. No, it is not half as fancy as Rational Developer for i, nor VS Code, but it doesn’t have to be.

It’s like us all going back to SEU to make a quick CL programming change. Don’t tell me you don’t LOL.

Installing Nano

Nano can be installed using Yum from a SSH terminal window or via ACS (Access for Client Solutions).

Bash

yum install nano

I already have nano installed on my box, running version 5.3. this can be seen in the figure below.

Now we have it installed how do we use it?

Using Nano

Nano is very simply used, in a shell session, by typing

Bash

nano christmas.txt

if the file name doesn’t exist, it will create it for you.

Once started, nano gives you an open canvas for writing whatever you need, as can be seen in the figure below.

Type the code you need to input and then when finished, press the Ctrl key X, it will ask you if you want to save the file, so press Y if you do.

To check the file has been written correctly a quick cat command, which outputs the file for me.

Bash

cat christmas.txt

For those still not using a secure shell session for all your Open-Source needs, try running nano in a 5250 STRQSH screen! It will get very messy!

Conclusion

Once again Open-Source on IBM i comes to the rescue. For those quick easy fixes of configuration files try nano, it is well worth the try.

If you have any questions, either on this article, or anything else on the IBM i, please use the comments below, or contact us via the contact us page at https://powerwire.eu/contact

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 2

No votes so far! Be the first to rate this post.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *