Skip to content

Latest commit

 

History

History
50 lines (40 loc) · 1.68 KB

File metadata and controls

50 lines (40 loc) · 1.68 KB

Nano Text Editor

Getting Started

Nano shows available shortcuts at the bottom of the screen. The ^ symbol means Ctrl, so ^X means Ctrl+X. Nano is designed to be simple and beginner-friendly. [nano](/man/nano) textfile.txt

Key Description
Ctrl+G Display help text
Ctrl+X Exit nano (prompts to save if modified)

Navigation

Use arrow keys for basic movement, or these shortcuts for faster navigation.

Key Description
Ctrl+A Move to beginning of line
Ctrl+E Move to end of line
Ctrl+Y Scroll up one page
Ctrl+V Scroll down one page
Ctrl+_ Go to a specific line (and column) number
Ctrl+C Show current cursor position (line, column)

File Operations

Nano prompts for confirmation before overwriting files.

Key Description
Ctrl+O Write out (save) the current file
Ctrl+R Read (insert) another file into the current one

Search

Search is incremental — press the shortcut again to find the next match.

Key Description
Ctrl+W Search for text
Ctrl+\ Search and replace

Editing

Cut and paste in nano works on whole lines by default. Use Ctrl+K to cut and Ctrl+U to paste.

Key Description
Ctrl+K Cut the current line (or selected text)
Ctrl+U Paste (uncut) the last cut text
Ctrl+J Justify the current paragraph
Ctrl+T Execute a command (or spell check in older versions)
Ctrl+D Delete the character under the cursor
Backspace Delete the character before the cursor