This post shows you some shortcut commands used by developers, working with files in the Nano editor.

Nano editor shortcut commands

ShortcutDescription
help pageCtrl + G
Exit pageCtrl + E
Justify the lineCtrl + J
UnJustify the lineCtrl + U
Previous Page
Next pageCtrl + V
Cut TextCtrl + K
spell checkCtrl + T

Shortcut cursor navigation through in nano editor

ShortcutDescription
Move one word forwardCtrl + Space
One word backwardAlt + Space
One character forwardCtrl + f
one character backwardCtrl + b
Move to line start or beginningCtrl + a
Move to end of lineCtrl + e
Move to specific line numberCtrl + /

Nano Cut copy page commands

First, go to the line, and use Ctrl + K to Cut To paste it, use the Ctrl + U command on the target line

Nano File Shortcuts

ShortcutDescription
Save FileCtrl + O
Open a new fileCtrl + r Alt + f
Change to another previous fileAlt + <
Change to another next fileAlt + >
Move to line start or beginningCtrl + a
Move to end of lineCtrl + e
Move to specific line numberCtrl + /

Jump to line X in the nano editor

You can use a shortcut or via command line.

Ctrl + /

Or open a nano editor with a line number option in the opening file

nano +6 test.txt

Nano Search and replace commands

ShortcutDescription
Find textCtrl + w
Repeat last searchAlt + w
Find and replaceCtrl + \ or Alt + r
Change to another next fileAlt + >
Move to line start or beginningCtrl + a
Move to end of lineCtrl + e
Move to specific line numberCtrl + /

Reference

Nano reference