The nano editor is a very popular and easy-to-use command-line editor. You can open the nano editor by running the nano command:
elliot@ubuntu-linux:~$ nano
This will open up your nano editor, and you should see a screen like that in the following screenshot:

Now add the six lines that are shown in the following screenshot:

Look at the bottom of the nano editor screen; you will see a lot of shortcuts:

I have included all the useful nano shortcuts in the following table:
nano shortcut | What it does |
Ctrl+O |
Saves the current file (write out). |
Ctrl+K |
Cuts the current line and stores it in the buffer. |
Ctrl+U |
Pastes the line stored in the buffer. |
Ctrl+W |
Searches for a string (word) in the file. |
Ctrl+\ |
Replaces a string (word) in the file with another string. |
Ctrl+R |
Reads another file. |
Ctrl+G |
Views help information on how to use nano. |
Ctrl+V |
Moves to... |