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:
It displays a prompt in the Terminal window, waiting for you to type a command and press Enter.
It reads your command and interprets any special symbols you typed.
It runs the command, automatically locating any necessary programs.
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.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access