Nano HOWTO

From Global Shellz Wiki
Jump to: navigation, search

"nano" is a popular command-line text editor.

Contents

Open and create files

To open and create files in nano, simply type:

nano filename

Example

A nano window looks like this:

 GNU nano 2.2.4                           File:filename
                                                           



^G Get Help        ^O WriteOut        ^R Read File       ^Y Prev Page       ^K Cut Text        ^C Cur Pos
^X Exit            ^J Justify         ^W Where Is        ^V Next Page       ^U UnCut Text      ^T To Spell

Keyboard shortcuts

  • Ctrl+O - save changes
  • Ctrl+X - exit nano. If you ask nano to exit from a modified file, it will ask you if you want to save it. Just press N in case you don't, or Y in case you do. It will then ask you for a filename. Just type it in and press Enter.
  • Ctrl+K - cut a single line; to cut multiple lines, simply use several Ctrl+Ks in a row.
  • Ctrl+U - paste
  • Ctrl+6 (or Alt+A) - start/stop marking the text; marked text also can be cut with Ctrl+K
  • Ctrl+W - search for a string
  • Alt+W - find next

External links

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox