## 1.3. Types of Commands

When you use a program, you'll want to know how to control it. How can you tell it what job you want done? Do you give instructions before the program starts, or after it's started? There are three general ways to give commands on a Unix system, three different kinds of programs. It's good to be aware of them.

1. Some Unix programs work only with a window system. For instance, when you type netscape at a shell prompt (or click a button or choose the command from a menu), the Netscape web browser starts. It opens one or more windows on your screen. The program has its own way to receive your commands--through menus and buttons on its windows, for instance.

2. You've also seen (previously, in Section 1.2) Unix commands that you enter at a shell prompt. These programs work in a window system (from a terminal window) or from any terminal. Control those programs from the Unix command line--that is, by typing options and arguments from a shell prompt before you start the program running. After you start the program, wait for it to finish; you generally don't interact with it.

3. Some Unix programs that work in terminals have commands of their own. (If you'd like some examples, see Section 3.2 in Chapter 3 and Section 4.3.2 in Chapter 4.) These programs may accept options and arguments on their command line. But, once you start the program, it prints its own prompt and/or menus and it understands its own commands; it takes instructions from your keyboard, which weren't given on its command line.

   For instance, if you enter pine at a shell prompt, you'll see a new prompt from the pine program. Enter Pine commands to handle email messages. When you enter the special command q to quit the pine program, pine will stop prompting you. Then you'll get another shell prompt, where you can enter other Unix commands.

Copyright © 2003 O'Reilly & Associates. All rights reserved.