Using the Nano Editor with a Raspberry Pi

Today I talk about the Nano editor which can be used to edit files on the Raspberry Pi over SSH.

What is Nano?

Nano is an easy to use command line text editor. It is very useful when you need to edit files on your Raspberry Pi over SSH.

Using Nano means you don’t need to launch any GUI applications, which can be tricky over SSH.

Nano is considered one of the easier to use editors as all its key combinations are shown on the screen at once.

Using Nano

Nano can be started on the command line by running the nano command. To open a file with nano you can run the command nano <filename>.

Once nano has been opened with a file, you will see the following screen.

This works similar to a standard word processors, if you want to move around the screen you use the keyboard arrows. To add text you are able to use the keyboard and type like normal.

The bottom row of the editor gives a list of commands you can perform to save, exit, get help, or do a number of other functions.

The commands are in the form of ^ and then a letter. This can be entered by pressing CTRL and then the letter indicated. For example to save the file (write it out) you can press CTRL-o.

Once you have made your edits you can press Ctrl-o to save the file. This will prompt you to choose the filename to save it as. By default it will save it as the current filename however you can save it as whatever you wish.

Once saved, you are able to exit nano with Ctrl-x. If it detects there are unsaved changes you have the option of discarding your changes or writing them. Again if you decide to write them out you are given the option to save the file.


Nano is a useful command line editor available on most Linux Distributions. For all the future work with configuring the Raspberry Pi Cluster I will use nano.

One Comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.