I have found the first 8 Nano Editor functions listed in the nano editor cheat sheet below to be the most valuable in the work I’ve done as a DevOps engineer.
Ctrl x – Close the file
Ctrl o – Save the file
Ctrl w – Search for a string in the file you’re editing
Ctrl space – Go forward one word in a line
Alt space – Go backwards one word in a line
Ctrl a – Go to the beginning of a line
Ctrl e – Go to the end of a line
Ctrl w + Ctrl v – Go to the last line of the file
Ctrl + k – Cut the current line and save it to nano ‘s clipboard.
Ctrl + Shift + 6 – Select text. You can then copy or cut that text.
Ctrl + u – Paste the text from nano ‘s clipboard.
For those who don’t know, you can edit a file with the nano editor via your terminal using the following command:
nano filename.php