# Nano
Nano is a simple, modeless terminal text editor for [[Unix]]-like systems. Originally created as a free replacement for the Pstrings editor Pico (part of the Pine email client), Nano is designed to be easy to use — all commands are displayed at the bottom of the screen, and there are no modes to learn.
Nano is pre-installed on most [[Linux]] distributions and is the default editor for many systems, making it the go-to choice for quick config file edits and users who don't need the power of [[Vim]] or [[Neovim]].
## Key features
- **Modeless editing**: Type immediately — no modes to switch between
- **On-screen shortcuts**: Available commands always visible at the bottom
- **Syntax highlighting**: Supports many languages via nanorc
- **Search and replace**: `Ctrl+W` to search, `Ctrl+\` to replace
- **Line numbers**: `Ctrl+C` shows current position, `-l` flag enables line numbers
- **Multiple buffers**: Open and switch between multiple files
- **Undo/redo**: `Alt+U` / `Alt+E`
## Essential shortcuts
| Shortcut | Action |
|----------|--------|
| `Ctrl+O` | Save (Write Out) |
| `Ctrl+X` | Exit |
| `Ctrl+W` | Search |
| `Ctrl+\` | Search and replace |
| `Ctrl+K` | Cut line |
| `Ctrl+U` | Paste (Uncut) |
| `Ctrl+G` | Help |
| `Alt+U` | Undo |
| `Alt+E` | Redo |
| `Ctrl+_` | Go to line number |
## Configuration
Configured via `~/.nanorc` or `/etc/nanorc`:
```sh
# Enable line numbers
set linenumbers
# Enable syntax highlighting
include "/usr/share/nano/*.nanorc"
# Smooth scrolling
set smooth
# Auto-indent
set autoindent
# Tab size
set tabsize 4
set tabstospaces
```
## When to use Nano vs Vim/Neovim
- **Nano**: Quick edits, config file changes, unfamiliar servers, users who prefer simplicity
- **[[Vim]]** / **[[Neovim]]**: Extended editing sessions, code development, power users who benefit from modal editing
## References
- https://www.nano-editor.org/
- https://en.wikipedia.org/wiki/GNU_nano
## Related
- [[Vi]]
- [[Vim]]
- [[Neovim]]
- [[Command Line Interface (CLI)]]
- [[Shell]]
- [[Bash]]
- [[Zsh (Z Shell)]]
- [[Unix]]
- [[Linux]]