Skip to main content

Nano Keyboard Shortcuts

File Management & Basics​

ShortcutAction
Ctrl + OWrite Out — Save the current file changes
Ctrl + XExit nano; prompts to save unsaved changes
Ctrl + RInsert another file at the cursor position
Ctrl + GOpen the Help menu

Searching & Replacing​

ShortcutAction
Ctrl + WSearch for a keyword (Where Is)
Alt + WRepeat the last search forward
Ctrl + \ / Alt + RSearch and replace text throughout the file

Editing, Cutting & Pasting​

ShortcutAction
Ctrl + KCut the entire current line
Ctrl + UPaste the text you just copied or cut
Alt + 6Copy the current line without deleting it
Alt + ASet the mark; use arrow keys to select text
Ctrl + JJustify/wrap the current paragraph

ShortcutAction
Ctrl + AMove to the beginning of the current line
Ctrl + EMove to the end of the current line
Ctrl + YPage up — scroll up one screen
Ctrl + VPage down — scroll down one screen
Alt + \Jump to the very top of the file
Alt + /Jump to the very bottom of the file

View & Interface Toggles​

ShortcutAction
Alt + NToggle line numbers on/off
Alt + $Toggle soft wrapping
Ctrl + CShow cursor position — line, column, and character count