Nano text editor

Installation, shortcuts, and everyday usage tips for Nano.

Nano is a lightweight, no-nonsense console text editor for Unix-like systems. Unlike Vim or Emacs, it doesn't require memorising arcane commands — if you can type and follow the on-screen prompts, you're good to go.

Installation

Nano comes pre-installed on most VPS and dedicated servers. On the rare occasion it's missing, install it with your distro's package manager:

Debian / Ubuntu:

apt-get install nano

CentOS:

yum install nano

Interface overview

When you open a file in Nano, you'll see four distinct areas:

  1. Top bar — editor version, filename, and whether unsaved changes exist
  2. Editing area — where you actually type
  3. Status bar — informational messages from the editor
  4. Bottom bar — shortcut hints for the most common actions

The ^ symbol means Ctrl. A double symbol (^^) means Esc.

Opening a file

nano filename

With additional options:

nano -option1 -option2 +line,column filename

To see all available options:

nano -h

Core keyboard shortcuts

Shortcut Action
Ctrl + G or F1 Open help
Ctrl + X or F2 Exit Nano
Ctrl + O or F3 Save the file
Ctrl + W or F6 Search within the file
Ctrl + K or F9 Cut the current line to buffer
Ctrl + U or F10 Paste from buffer
Ctrl + Y or F7 Page up
Ctrl + V or F8 Page down
Ctrl + C or F11 Show current cursor position
Ctrl + J or F4 Justify the current paragraph
Ctrl + R or F5 Insert contents of another file
Ctrl + T or F12 Spell check

Our products and services

Web HostingReliable hosting services for websites of any scale.
Order
VPSFlexible cloud infrastructure with full root access.
Order
Dedicated ServersBare metal servers for maximum performance.
Order

Editing shortcuts

The Meta key (m) can be substituted with Esc or Alt depending on your terminal.

Shortcut Action
Alt + A Start text selection
Ctrl + K Cut selected text
Alt + 6 Copy selected text
Ctrl + U Paste from buffer
Alt + \ Jump to the first line of the file
Alt + / Jump to the last line of the file
Ctrl + _ or Alt + G Go to a specific line and column
Alt + W Repeat last search
Alt + 6 Copy current line to buffer
Alt + { / Alt + } Decrease / increase line indent
Home / End Go to beginning / end of line
Alt + T Cut from cursor to end of file
Alt + J Justify all text
Alt + D Count words, lines, and characters
Alt + Y Toggle syntax highlighting

Useful launch options

Option Description
-h, -? Show help
+row,column Open file at a specific line and column
-S Enable smooth, line-by-line scrolling
-c Constantly show cursor position
-i Auto-indent new lines
-u Enable undo / redo (Alt+U to undo, Alt+E to redo)
-v View-only mode (no editing)
-w Disable line wrapping
-x Hide the shortcut hint bars at the bottom
-B Keep backup copies of files when saving

Help

If you have any questions or need assistance, please contact us through the ticket system — we're always here to help!

Need help?Our engineers will help you free of charge with any question in minutesContact us