Text and processing

The nano command

Simple text editor in the terminal. Ideal to edit config files without hassle.

Syntax

nano [archivo]Try it in the terminal →

Copy-ready examples

$ nano /etc/hostnameOpen a file

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • Quit with Ctrl+X and save with Y (Yes).

Related commands

FAQ

How do I save and quit in nano?

Ctrl+O saves and Ctrl+X quits; the shortcuts are shown at the bottom of the screen.

Is nano always installed?

Not on every minimal distribution; install it with sudo apt install nano.

More Text and processing commands

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course