GNU NANO a useful basic text editor.

Abarbarian

Acruncher
Joined
Sep 30, 2005
Messages
11,023
Reaction score
1,221
A newcomer to the wonderful world of linux will eventually need to place or alter some text in a file. The easiest editor to accomplish these tasks is NANO.
Here are several articles on using nano. They cover basic usage and more and all the articles contain excellent tips and information.

The Beginner’s Guide to Nano, the Linux Command-Line Text Editor

New to the Linux command-line? Confused by all of the other advanced text editors? How-To Geek’s got your back with this tutorial to Nano, a simple text-editor that’s very newbie-friendly.

When getting used to the command-line, Linux novices are often put off by other, more advanced text editors such as vim and emacs. While they are excellent programs, they do have a bit of a learning curve. Enter Nano, an easy-to-use text editor that proves itself versatile and simple. Nano is installed by default in Ubuntu and many other Linux distros and works well in conjunction with sudo, which is why we love it so much.

The strength of nano lies in its simplicity of use. The shortcuts work just like in GUI-based word processors like Word and Open Office, so it’s just a matter of learning which ones do what. Everything outside of that is just simple text-editing. Next time you have to edit stuff on the command-line, we hope that you’ll be more comfortable with it now that you’ve gotten familiar with nano.


Some History
Nano was designed to be similar in look and feel to another program called Pico. Pico was the default text editor of Pine, an email program from back in the day that wasn’t distributed with a GPL-friendly license. This meant that redistribution was somewhat of a fuzzy area, and so the TIP project was born. “TIP Isn’t Pico” added some functionality that Pico lacked and was licensed for free distribution, and over time, became the nano we love to use today. For more information, check out the Nano Project’s History section on their FAQ.

A Beginners Guide To The Nano Editor


How To Backup A File Before Saving It In Nano
If you want to save the changes to a file that you are editing but you want to keep a backup of the original press ctrl and o to bring up the save window and then press alt and B.

The word [backup] will appear in the filename box.

.

Linux Nano editor explained for beginners (10 examples)

How to backup previous version of a file
The tool allows you to backup the previous version of the file being edited. This is done after you make changes and save the file. This feature can be accessed using the -B command line option.

$ nano -B [filename]

For example:

$ nano -B abc.txt

The backup will be saved in the current directory with the same filename but suffixed with a tilde (~).



Note that files created for the first time can not be backed up.

How to Use Nano Text Editor Commands in Linux

Command Keys
When using nano, control characters (CTRL) are represented by a carat (^). For example, if you wish to cut a line of text, you would use the “CTRL” key followed by the “K” key. This sequence of commands is represented as ^K in nano. Some commands use the “Alt” key in order to function, which is represented by the letter “M”. A command represented as M-R in nano would be performed by pressing the “Alt” key followed by the “R” key. Mac users may need to use the “Escape” (Esc) key instead of the “Alt” key to use these commands.

Oh and breaking news nano has been updated !

Nano 3.0 Released! Reads Files 70% Faster


GNU nano 3.0 has just been released. Let’s see what new features it brings.
is one of the most popular terminal based text editors. Those who keep forgetting how to exit Vim, seek refuge with GNU nano. It’s a godsend for beginners who have to deal with editing in the command line while the experienced nano fans just swear by it.

GNU nano 3.0 has just been released. Let’s see what new features it brings.


Have fun in penguin land folks.
breakfast.gif
 

Ian

Administrator
Joined
Feb 23, 2002
Messages
19,873
Reaction score
1,499
I find nano so much easier than VI, as everything is labelled so I don't need to remember any shortcuts :D.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top