O'Reilly logo

Beginning Mac OS® X Programming by Drew McCormack, Michael Trent

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

11.1. Getting Started

Before you can start interacting with the operating system via the Terminal application or writing your own shell scripts, some preliminaries need to be taken care of. First, you need to know what a command-line interface (CLI) is and the different ways in which it can be used. You need to have an application that can access the CLI and a way to edit scripts and other text files. Finally, you need to configure your Bash Shell before you start using it. This section covers these aspects, preparing you for the next section when you actually begin using the Bash Shell.

11.1.1. The Command-Line Interface

The Mac has always had an excellent graphical user interface (GUI). It's what made the Mac famous to begin with; with Mac OS X, Apple continues to lead the way when it comes to GUI design.

What was never popular under the old Mac OS was the command-line interface. A CLI is a means of interacting with the operating system via textual commands entered on the keyboard rather than by pointing and clicking the mouse. A CLI usually requires the user to enter commands at a simple prompt rather than interacting via controls and menus.

The CLI on the Mac under the old Mac OS was not popular for a number of reasons, but the most important was that earlier versions of the Mac OS did not actually have a CLI. Where Windows users could start up MS-DOS and enter commands to copy files or execute programs, Mac OS users didn't have this option; in all honesty, most didn't want ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required