Chapter 1. Inside the Terminal
The first order of business when exploring a new flavor of Unix is to find the command prompt. In Mac OS X, you won’t find the command prompt in the Dock or on a Finder menu. Instead, you’ll need to use the Terminal application, located in /Applications/Utilities. Inside the Terminal, Unix users will find a familiar command-line environment. In this chapter we’ll describe the Terminal’s capabilities, comparing them to the corresponding functionality of X11 terminal emulators such as xterm when appropriate. We’ll also highlight key features of some alternatives to the Terminal. The chapter concludes with a synopsis of the open command, which you can use to launch native Mac OS X applications from the Terminal, and a quick look at a freeware application that allows you to open a Terminal window from a Finder window.
Mac OS X Shells
Mac OS X comes with the Bourne Again SHell (bash) as the default user shell and also includes the TENEX C shell (tcsh), the Korn shell (ksh), and the Z shell (zsh). bash, ksh, and zsh are compatible with sh, the original Bourne shell. When tcsh is invoked through the csh link, it behaves much like csh. Similarly, /bin/sh is a hard link to bash, which also reverts to traditional behavior when invoked through this link (see the bash manpage for more information).
The version of bash that ships with Mac OS X is, according to its manpage, a conformant implementation of the Shell and Utilities portion of the IEEE POSIX Standard 1003.1 ...
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