Topics Map > University of Chicago > IT Services > Applications, Operating Systems, & Devices

Unix - Using Pico

This article explains how to use the Pico text editor in Unix.

There are several popular text-editors (such as emacs and vi) for the Unix command line; pico is the easiest one for a new user to learn. This documentation is geared towards getting you ready to use pico as quickly as possible. For a more exhaustive explanation of pico, type: "man pico" on the command line to get pico's manual.

Starting Pico

You start pico simply by typing "pico" on the command line. This opens a new and nameless document. If you invoke pico by typing:
pico new_file

you will create a new document named new_file. If you'd like to edit an existing document, simply input:
pico existing_file

Working In Pico

Pico's interface is pretty simple: you enter text by typing, you move around using your arrow keys, and you enter commands by pressing the control (Ctrl) key (denoted in pico by a ^) and a letter. Pico's entire command set is listed at the bottom of the screen, so if you don't see it, you can't do it.


To delete something you've written, simply back over it using the backspace (Windows and Sun keyboards) or delete (Mac keyboards) key.

Pico In Two Commands

As mentioned above, commands are denoted by a ^ and a letter. For example, to find a string of text in a document you'd press the control key and w (the commands are not case-sensitive) to invoke a "Where is" search, enter the text you'd like to find, and hit enter/return on your keyboard. You know to do this because in the list of commands at the bottom of the screen the "Where is" command denoted by a "^W".

For simple text editing, there are really only two commands you need to know: ^X for exit and ^O for "WriteOut" (which is just an awkward way of saying "Save"). If you open a document or start editing a new one, you can save it by pressing control-o (for ^O): if you haven't named the document yet, you will be asked what to call it; if it already has one, its current name will be suggested.

Once you're finished working in pico, exit by using the key combination of control-x (for ^X). If you haven't saved your document, you will be asked whether you would like to; if you save yes, you will be dropped into the prompt for "WriteOut" before you exit.

Keywords:unix pico text editor   Doc ID:15869
Owner:Larry T.Group:University of Chicago
Created:2010-11-30 18:00 CSTUpdated:2015-01-19 12:06 CST
Sites:University of Chicago, University of Chicago - Sandbox
Feedback:  1   9