Nano
13 April 2005
(Introducing Text Editors Part 1: Nano)
- Introduction
The simplest command-line editors are pico and nano. Pico was the original Unix mini-editor. Because pico was not free software, nano was created as a compatible but enhanced clone.
Nano is short for "Nano's ANOther editor". As a mark of (dis?)respect for their size, nano and pico are usually referred to by a small first letter.
While nano is compatible with pico, it can do a few more things and is better all round. Nano is also included by default on many GNU/Linux/BSD distributions. Therefore nano is the basis of this post. Much of it will apply to pico too.
- Opening Files
To open a file in nano, just type: (do not type the #)
# nano filename
That is basically all you need to know to get going with nano. It is really that simple!
If you want to edit a system file then you need to use the -w option. This stops the text from wrapping.
# nano -w filename
- Leaving nano
To leave nano, just type Ctrl+x. It will ask you if you want to save and where you want to save it.
- Killing and Yanking
To Kill text (i.e. cut) just type Ctrl+k. To Yank text (i.e. paste) just type Ctrl+u
- Where is text?
To search for text then use the where function by typing Ctrl+w
- More about nano
Don't worry if you can't remember all that yet, all 12 possible nano commands are at the bottom of the nano screen/window. The little roof means the Ctrl key, so ^X means Ctrl-x.
In theory Nano can do much more but in practice you wouldn't want to. Any job more complicated than this would be better off done in a more complicated program.
Nano is a handy little toy because it opens automatically. If you just want to change a variable in a small file or something, then nano requires very few keystrokes do get the job done.
- More sources of information
This is already overkill but if you really must know more then Nano has a homepage, you can also read its man file by typing:
# man nano
I really cannot think of anything more to say about nano, it is just that simple! If you think I have missed an important fact that the world needs to know then please make a comment below.


