LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

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 textfile.txt
copy
KeyDescription
Ctrl+GDisplay help text
Ctrl+XExit nano (prompts to save if modified)

Navigation

Use arrow keys for basic movement, or these shortcuts for faster navigation.
KeyDescription
Ctrl+AMove to beginning of line
Ctrl+EMove to end of line
Ctrl+YScroll up one page
Ctrl+VScroll down one page
Ctrl+_Go to a specific line (and column) number
Ctrl+CShow current cursor position (line, column)

File Operations

Nano prompts for confirmation before overwriting files.
KeyDescription
Ctrl+OWrite out (save) the current file
Ctrl+RRead (insert) another file into the current one

Search

Search is incremental — press the shortcut again to find the next match.
KeyDescription
Ctrl+WSearch 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.
KeyDescription
Ctrl+KCut the current line (or selected text)
Ctrl+UPaste (uncut) the last cut text
Ctrl+JJustify the current paragraph
Ctrl+TExecute a command (or spell check in older versions)
Ctrl+DDelete the character under the cursor
BackspaceDelete the character before the cursor
Copied to clipboard
Kai