How to use nano editor – Beginners’ guide

In this article we will see how to use the very popular nano editor. This is just a very basic introduction for beginners.

First of all you have to login to SSH. If you don’t have nano installed you can do it by typing for CentOS:

yum install nano

And for Ubuntu:

sudo apt-get install nano

After this you are ready to use it. In order to edit a file, the command (for file.txt for example) is:

nano /path_to_your_file/file.txt

and then the GUI of the nano editor will appear with the contents of the file you want to edit. You can edit the text like any other text editor and some basic commands are:

 

  • To save a file in nano: CTRL+O
  • To exit nano: CTRL+X (if you haven’t saved the file it will ask you, with Y you save and with N you don’t)
  • To search for a text CTRL+W

 

There are many more commands you can use, like copy/paste etc but this is just an introductory guide. For more information you can check the nano official website.

 

Just a reminder, editing system files can be dangerous. If you don’t know what to do ask for help someone who does 🙂

Master of SEO, server management specialist, guru of web development. A living legend.

Leave a Reply

Next ArticleHow to get cheaper cPanel/WHM