Working with Terminal

The first step to getting started with the Unix CLI on OS X is to launch Apple's Terminal application, which resides in the Utilities folder (press Shift+Command Key+U to jump there in the Finder). Terminal can perform a variety of tasks, but its simplest function is accessing the Unix shell. When you launch Terminal, it appears as shown in Figure 36.1.

When you launch Terminal, you are looking at a working Bash shell's command prompt. (A shell is a variation of Unix's command language, which you can see by how the command prompt changes; you can think of it as a dialect.) You don't have to use Bash; Terminal supports several other shells, including tcsh. To change shells, open Terminal's Preferences dialog box (choose Terminal⇒Preferences or press Command Key+, [comma]), go to the Startup pane, and in the Shell Opens With option, select Command (Complete Path) and enter your preferred shell path in the text field below (/bin/bash for Bash or /bin/tcsh for tcsh).

Some notes on using Terminal:

• Press uparrow to display the last command you entered, edit it if desired, and press Return to have the shell run it again. You can scroll up to any previous commands from the current session to rerun ...

Get OS X Mountain Lion Bible 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.