What’s the Terminal?

The Terminal is an application that runs commands. If you’re familiar with DOS command lines on Microsoft Windows, the Terminal is somewhat similar (but much more powerful).

Inside each Terminal window, there is a special program running called a shell. The shell does four simple things:

  1. It displays a prompt in the Terminal window, waiting for you to type a command and press Enter.

  2. It reads your command and interprets any special symbols you typed.

  3. It runs the command, automatically locating any necessary programs.

  4. It prints the output, if any, in the Terminal window.

The Terminal’s job is merely to open windows and manage shells. Using the Terminal, you can resize the windows, change their colors and fonts, and perform copy and paste operations. But it’s the shell that is doing the real work of reading and running commands. Figure 1-1 shows how the Terminal and the shell work together: when you peer into a Terminal window, you are viewing a shell, which in turn interacts with your Macintosh.

Viewing OS X through the Terminal and the shell
Figure 1-1. Viewing OS X through the Terminal and the shell

Get Macintosh Terminal Pocket Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.