Nano Text Editor

Having SSH access to your server means little if you do not have the ability to edit the plethora of text configuration files that Linux presents to you. For those files, you need a text editor, and one text editor that combines ease of use with power and efficiency is Nano.

Unlike other text-based editors for Linux, Nano uses ncurses to simulate a graphical environment. Mouse clicks and scrolls work, and functions are controlled by hot-key combinations. To start nano, simply type “nano” from the command line. If, for example, you wanted to edit /etc/fstab, you would login as root and then type:

nano /etc/fstab

Use the arrow keys to navigate up, down, left, and right. Backspace and delete will work just like a graphical text editor. At the bottom of the screen, Nano will display the various functions that are available. To get a full list of functions, press Ctrl+G to “get help”.

To save the file you are working on, press Ctrl+O, and to exit Nano, press Ctrl+X. If you ever need to search for a particular word in the file you are editing, press Ctrl+W and enter the search terms. If you have a file with particularly long lines, you can start Nano with word wrap, by entering: “nano -w”.

Nano is free and open source software based on the Pine email client editor called Pico. Because of licensing issues, the GNU project created Nano to be a freely distributed alternative and is now available for installation on most Linux distributions. For more information about Nano, visit the project website.