Skip to content

nano

nano in action

Using nano to edit the file my_file.txt.

UPPMAX has multiple text editors available. This page describes the GNU nano text editor.

Want to see a video?

You can find a video on using nano on Rackham here

GNU nano is a simple terminal text editor that is easy to learn.

Starting nano

Start nano on a terminal with:

nano

To start nano to edit a file (for example, my_file.txt, use:

nano my_file.txt

Using nano

The keyboard shortcuts are shown on-screen, where ^ denotes Ctrl and M the meta key.

OS specifics:

  • On Windows, Alt is the meta key
  • On Mac: in the Terminal.app, go to 'Preferences -> Settings -> Keyboard' and turn on "Use option as meta key", after which Alt is the meta key

Common tasks:

  • Save a file: CTRL + O , then edit the filename and press enter
  • Exit: CTRL + X, press "y" or "n" on some questions and/or press Enter to confirm.
  • Help: CTRL + G

More tips can be found at the nano cheat sheet.