Skip to content
KD
Go back

Nano Editor Keyboard Shortcuts — Complete Reference

Nano is a lightweight, beginner-friendly terminal text editor for Linux and Unix systems. Unlike Vim or Emacs, Nano shows available commands at the bottom of the screen, making it easy to get started. This guide covers every essential shortcut you need.

Nano Editor

ShortcutAction
Ctrl + AJump to the beginning of the current line
Ctrl + EJump to the end of the current line
Ctrl + YScroll one page up
Ctrl + VScroll one page down
Ctrl + _Go to a specific line and column number
Ctrl + CShow current cursor position (line / column / character)

File Operations

ShortcutAction
Ctrl + OSave (write out) the file — Nano will prompt to confirm the filename
Ctrl + XExit Nano — prompts to save if unsaved changes exist
Ctrl + ROpen a file and insert its contents at the current cursor position

Editing Shortcuts

ShortcutAction
Ctrl + KCut the entire current line (or selected text) to the cut buffer
Ctrl + UPaste (uncut) text from the cut buffer at the current position
Ctrl + JJustify (reflow) the current paragraph
Ctrl + \Find and replace a string or regular expression
Alt + AToggle text selection mode — combine with Ctrl + K to cut a specific region

Search Shortcuts

ShortcutAction
Ctrl + WSearch for a phrase in the file
Alt + WRepeat the last search (find next occurrence)

Miscellaneous

ShortcutAction
Ctrl + GOpen the Help window with a full list of available commands
Ctrl + TInvoke the spell checker (if installed on your system)

Quick Tips

Installing Nano

Nano is pre-installed on most Linux distributions. If it’s missing, install it with:

# Debian / Ubuntu
sudo apt install nano

# RHEL / CentOS / Fedora
sudo dnf install nano

# macOS (via Homebrew)
brew install nano

Nano is an excellent tool for quick server-side edits, config file changes, and scripting — especially when a graphical editor isn’t available.


Share this post on:

Previous Post
How to Lock a File in Windows 10
Next Post
Getting a CDN Link for Every File on GitHub