When working on the command line, quite often you will need to create or edit text files. Two of the most powerful and popular command-line editors are Vi and Emacs. Both of them have a steep learning curve that can be intimidating to new users. For those who need a simple editor, there is nano.
GNU nano is an easy to use command line text editor for Unix and Linux operating systems. It includes all the basic functionality you’d expect from a regular text editor, like syntax highlighting, multiple buffers, search and replace with regular expression support, spellchecking, UTF-8 encoding, and more.
How to use nano
# syntax, OPTIONS = optional nano<OPTIONS><FILE>##### open a file on a specific linenano+50file.txt##### within nano text editor - search for a filectrl+w# then type the search term and press enter##### within nano text editor - copying, cutting and pastingctrl+k# CUT # move with your cursor/shift + arrow key over the point that you want to cutctrl+u# PASTE # paste the text that was cutted, or copyed earlier ##### within nano text editor - copy a selected blockctrl+6# mark will be set, from this point use the arrow keys for the text you want to copyalt+6# with this the marked text will be copyed, from this point you can use ctrl + u to paste the text##### within nano text editor - delete a selected blockctrl+6# mark will be set, from this point use the arrow keys for the text you want to copyctrl+k# CUT # move with your cursor/shift + arrow key over the point that you want to cut (or in this case delete)##### within nano text editor - save a filectrl+o##### within nano text editor - leave a filectrl+x