Essentially, all the shells
on the system (sh
, bash
, ksh
, tcsh
, and zsh
) do the same thing: they take input from you and translate it into commands that are run on the system. However, each shell differs in the specifics of how you interact with it and the special features that it offers. If you’ve never used the Unix shell, you’ll do just fine sticking with the default bash
shell. But if you’ve become accustomed to the tcsh
shell that was the default on earlier versions of Mac OS X, or if you are an old-hand Unix user who simply prefers another shell, you may want to change the default shell to suit your preferences.
Because a shell is a program like any other, all you have to do to use a different shell temporarily is type its name at the command line. For example, if you want to use the tcsh
shell, execute the following:
$ tcsh
The prompt changes to a percent sign (%
), which is the default prompt for the tcsh
shell, and will be in effect until you exit out of it.
To change the default shell used by the Terminal when it launches, simply open the Terminal preferences (Terminal → Preferences), then specify the shell you want to execute in the “Execute this command” text field, as shown in Figure 4-3. Now, whenever you open a Terminal window, you’ll get the shell that you want.
Note that this setting doesn’t change your default shell when you remotely log in. To change your default shell at the system level rather than only in the Terminal application, you’ll need to modify your user account’s shell
value. You’ll need to use NetInfo Manager to do so, as shown in Chapter 7.