Editing Files: nano

nano is a little text editor. You can think of it as something like a terminal version of Windows' Notepad.

The great thing about this interface is that it tells you exactly what to do. The bottom two lines of the screen are a cheatsheet for the most commonly used commands.

Just remember that ^ stands for "press the Ctrl key at the same time as". Ctrl-X will quit, Ctrl-O will save a file, etc. It doesn't take long to memorize these, but it's nice not to have to guess.

Your Friend the Text Editor

Text editors may not seem like the most interesting software, but you'll quickly find that an editor is indispensable for many of the things you want to accomplish in a shell environment.

nano is really sort of a baseline editor: It gets the job done, and it's easy on new users. Most modern systems will have it installed by default.

There are substantially more powerful choices that work well in a terminal, like Emacs and Vim, but these come with a steeper learning curve, so for the moment we'll use nano in our examples.

This guide was first published on Jan 13, 2015. It was last updated on Jan 13, 2015. This page (Editing Files: nano) was last updated on Nov 23, 2015.