🐧

Shortcuts

1 notes  •  Linux & Server Admin

Nano Text Editor Keyboard Shortcuts

Quick reference for the most useful keyboard shortcuts in the nano command-line text editor.

Navigation

Ctrl + A        — Go to beginning of line
Ctrl + E        — Go to end of line
Ctrl + Y        — Page up
Ctrl + V        — Page down
Alt + /         — Go to end of file
Alt + \         — Go to beginning of file
Ctrl + _        — Go to a specific line number

Editing

Ctrl + K        — Cut current line (or selected text)
Ctrl + U        — Paste (uncut)
Alt + 6         — Copy current line
Ctrl + ^        — Mark text (start selection)
Ctrl + W        — Find / search
Ctrl + \        — Find and replace

File Operations

Ctrl + O        — Save (Write Out)
Ctrl + X        — Exit (prompts to save if modified)
Ctrl + R        — Read/insert another file

Useful Options

# Open with line numbers shown
nano -l filename.txt

# Open at a specific line
nano +42 filename.txt

# Open in read-only mode
nano -v filename.txt