egginfo logo

Nano & Pico Editors

Nano is a command line text editor that can be run from the command prompt, from a telnet or ssh session. Nano is small and friendly to use and is designed to improve upon and replace the non-free pico included by default in the pine packages. The basic framework and commands are the same for both Nano and Pico, although Nano has a few advanced features and improvments which are available, such as search and replace.

Starting nano

You can start nano by typing "nano" or "nano filename". The filename can be an existing one you wish to edit or be a new filename. If the file does not exist, a new file will be created with that name.

[ghost@localhost:~] nano
[ghost@localhost:~] nano newfile.tcl
Nano - New Buffer

Nano - New File

The first thing you see is "GNU nano 2.0.8" in the top left. This is telling you the program name and its version. In the top middle you will either see either "New Buffer" or the filename you are editing. New buffer means that the file has not yet got a name assigned to it. This can be set when you exit the editor after making any modifications. You will also get an indication of wether the filename you are editing is a new file or already exists just above the menus at the bottom. This "New File" at the bottom will vary, including displaying the last process / command that was issued

Commands

The main used commands can be seen at the bottom of the screen. The "^" that you see represents the Ctrl key on your keyboard. "Ctrl - G" would display the help file. Note when you do enter a command, the existing commands available might alter at the bottom of the screen. A list of the commands you will see at the main edit window and descriptions of those commands are below.
^G      (F1)            Display the help file
^X      (F2)            Close the current file buffer / Exit from nano
^O      (F3)            Write the current file to disk
^J      (F4)            Justify the current paragraph
^R      (F5)            Insert another file into the current one
^W      (F6)            Search for a string or a regular expression
^Y      (F7)            Move to the previous screen
^V      (F8)            Move to the next screen
^K      (F9)            Cut the current line and store it in the cutbuffer
^U      (F10)           Uncut from the cutbuffer into the current line
^C      (F11)           Display the position of the cursor
^T      (F12)           Invoke the spell checker, if available
        (F13)           Go to line and column number
        (F14)           Replace a string or a regular expression
        (F15)           Mark text at the cursor position
        (F16)           Repeat last search

Examples

>>> Saving

Ctrl O
Nano - Save File

As you can see by pressing "ctrl-O" you are prompted for a filename, or shown the existing filename. To save the file enter a filename or change the shown filename if desired and hit the <Enter> key to confirm. If you did not want to save on this occasion you would hit ctrl-C , as indicated at the bottom of the window (^C Cancel).

Nano - File Written to Disk

This shows the file was saved and how many lines where written to file. Also the filename is now shown at the top centre of the window.

To exit the editor you press Ctrl X (^X Exit). If the file has changed you will be prompted to save. If no change has taken place the editor will exit and you will be returned to the command prompt.
 
blueline
Home, Tcl Tutorial, Tcl/Tk Installation, Modules, Tcl Scripts, Misc Downloads, Bot Commands,
Help/FAQ, Unix Commands, Message Commands, Shell Info/Reviews, About, Contact, Links. Nano & Pico.
Bnc's, Config Generator, OnJoin/Greet Generator, Identification Generator, Botnet creation & userfile sharing
IPV6, Vi Editor, Sitemap, Knowledgebase .

Select your language:
ENGLISH/US LITHUANIAN
 
eXTReMe Tracker
Valid HTML 4.01! Valid CSS!
 
blueline
Copyright © 2008 egginfo.org - All Rights Reserved.