Nano Basics

Nano is the friendliest terminal editor. Unlike vim, there's no special mode to enter before typing — you just open a file and start editing. The commands you need are displayed right on screen, making it nearly impossible to get stuck.

Opening a File

To edit a file with nano, type nano followed by the filename:

Nano isn't built into Windows, but you can use it through WSL (Windows Subsystem for Linux) or Git Bash. If you have Git for Windows installed, nano is available in Git Bash.

If the file doesn't exist, nano creates it when you save.

The Nano Interface

When nano opens, you'll see:

  • The file contents in the main area
  • A title bar showing the filename
  • A command reference at the bottom

The bottom commands use ^ to mean the Ctrl key. So ^O means "press Ctrl and O together."

[IMAGE: Screenshot of nano editor showing a simple text file with the command bar at the bottom displaying options like ^G Get Help, ^O Write Out, ^W Where Is, ^K Cut Text, ^X Exit]

Essential Commands

Editing works exactly as you'd expect — use arrow keys to move around, type to insert text, Backspace to delete.

Saving your changes:

  • Press Ctrl+O (Write Out)
  • Nano shows the filename — press Enter to confirm
  • You'll see "Wrote X lines" confirming the save

Exiting nano:

  • Press Ctrl+X to exit
  • If you have unsaved changes, nano asks if you want to save
  • Press Y for yes, N for no, or Ctrl+C to cancel

Searching for text:

  • Press Ctrl+W (Where Is)
  • Type your search term and press Enter
  • Press Ctrl+W again to find the next occurrence

A Quick Edit Workflow

Here's a typical scenario — editing a configuration file on a server:

nano /etc/myapp/config.ini    # Open the file
# Make your changes using arrow keys and typing
# Press Ctrl+O, then Enter to save
# Press Ctrl+X to exit

The entire process takes seconds once you're familiar with it.

Why Nano Is Great for Beginners

Nano doesn't try to be clever. It behaves like the simple text editors you've used before. The learning curve is minimal — if you can type, you can use nano.

For quick edits on remote servers or configuration files, nano is often the perfect choice. You don't need vim's power when you're just changing one line in a config file.

See More

Further Reading

You need to be signed in to leave a comment and join the discussion