Chapter 19. Shell Overview

The shell is a program that acts as a buffer between you and the operating system. In its role as a command interpreter, it should (for the most part) act invisibly. It can also be used for simple programming. The shell receives the commands you enter using the Terminal (or a similar program), and decides what to do with it.

This chapter provides a basic overview of the shells included with Mac OS X. Refer to Chapter 20 and Chapter 21 for specific information about Mac OS X’s two most-used shells, bash and tcsh, respectively.

Introduction to the Shell

The shell is the user interface to Unix, and by the same token, several shells are available in Unix. Mac OS X provides you with more than one shell to choose from. Each shell has different features, but all of them affect how commands will be interpreted and provide tools to create your Unix environment.

Let’s suppose that the Unix operating system is a car. When you drive, you issue a variety of “commands”: you turn the steering wheel, press the accelerator, or step on the brake. But how does the car translate your commands into the action you want? The car’s drive mechanism, which can be thought of as the car’s user interface, is responsible. Cars can be equipped with front-wheel drive, rear-wheel drive, four-wheel drive, and sometimes combinations of these.

The shell is simply a program that allows the system to understand your commands. (That’s why the shell is often called a command interpreter.) For many ...

Get Mac OS X Panther in a Nutshell, 2nd Edition 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.