GNU nano is the most accessible text editor for the Linux command line, favored for its simplicity and ease of use. Unlike more complex editors like Vim or Emacs, nano keyboard shortcuts are always visible at the bottom of the screen, but mastering the advanced combinations is the key to efficient server administration and configuration file editing. Whether you are a DevOps engineer or a Linux enthusiast, knowing these default keybindings allows you to navigate and edit files directly in the terminal without a GUI.
This guide provides a comprehensive list of nano shortcuts for the 2026 version. From basic file saving to advanced search-and-replace and block-indentation techniques, these hotkeys are essential for anyone working in a terminal environment. Note that in nano documentation, the ^ symbol represents the Ctrl key and M- represents the Meta key (usually Alt or Esc).
Essential File and Session Controls
These shortcuts handle the core operations of opening, saving, and exiting the editor.
| Action | Keyboard Combination |
| Exit Nano | Ctrl + X |
| Write Out (Save) | Ctrl + O |
| Read File (Insert File) | Ctrl + R |
| Get Help Screen | Ctrl + G |
| Justify Current Paragraph | Ctrl + J |
| Suspend Nano | Ctrl + Z |
Navigation and Cursor Movement
Moving through large configuration files is much faster with dedicated navigation hotkeys.
| Action | Keyboard Combination |
| Go to Line Number | Ctrl + _ (Underscore) |
| Go to Beginning of Line | Ctrl + A |
| Go to End of Line | Ctrl + E |
| Go to Next Page | Ctrl + V |
| Go to Previous Page | Ctrl + Y |
| Next Word | Ctrl + Space |
| Previous Word | Alt + Space |
| Go to Matching Bracket | Alt + ] |
Editing and Text Manipulation
These shortcuts allow for rapid cutting, pasting, and modifying text blocks.
| Action | Keyboard Combination |
| Cut Current Line (Kut) | Ctrl + K |
| Uncut (Paste) Line (Unkut) | Ctrl + U |
| Copy Line (without cutting) | Alt + 6 |
| Set Mark (Selection Mode) | Alt + A |
| Undo Last Action | Alt + U |
| Redo Last Action | Alt + E |
| Delete Character at Cursor | Ctrl + D |
| Delete Character to Left | Ctrl + H (or Backspace) |
| Indent Marked Region | Alt + } |
| Unindent Marked Region | Alt + { |
Search and Replace Shortcuts
Finding specific variables or strings in a script is efficient with these search tools.
| Action | Keyboard Combination |
| Where Is (Search) | Ctrl + W |
| Replace String | Ctrl + \ |
| Find Next | Alt + W |
| Find Previous | Alt + Q |
| Count Words / Lines | Ctrl + D |
Interface and Toggle Features
Customize how nano displays your code or text with these real-time toggles.
| Action | Keyboard Combination |
| Toggle Line Numbers | Alt + N |
| Toggle Syntax Highlighting | Alt + Y |
| Toggle Soft Wrap | Alt + $ |
| Toggle Mouse Support | Alt + M |
| Toggle Smooth Scrolling | Alt + S |
Professional Tip: The “Mark” Selection Workflow
To edit a specific block of text rather than an entire line, use the Alt + A shortcut to set a “Mark.” Once the mark is set, use your arrow keys to highlight the desired area. You can then use Ctrl + K to cut just the highlighted section or Alt + 6 to copy it. To cancel the selection, simply press Alt + A again.
Most of these nano default controls are configured in the .nanorc file located in your home directory. If you frequently use nano for coding, enabling features like set linenumbers and set syntax on in that configuration file will make your terminal experience much more powerful.

