Section 4.3. Using Other Shells


4.3. Using Other Shells

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.

The Secure Shell

There's another popular shell found on Unix systems: ssh. The secure shell allows you to connect to a remote Unix system and execute commands on it as if you were sitting at its console. ssh is primarily made up of two components. One is sshd, which is dubbed Remote Login on Mac OS X. This is the server component of ssh that handles incoming shell requests.

The other half of ssh is the ssh command, which is kept in /usr/bin. You can learn more about the Secure Shell in Chapter 12.


4.3.1. Changing the Shell

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.

Figure 4-3. Changing the shell using the Terminal preferences pane


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.

Using Other Terminals

In addition to having many different shells to choose from, there are alternative terminal applications available. If you find that Apple's Terminal doesn't get the job done, you can try out an application such as iTerm (http://iterm.sourceforge.net/). iTerm, a freeware application, fulfills the same purpose as Apple's Terminal, but it has a few extra niceties, such as a tabbed window interface and graphical flourishes, such as using an image as your Terminal window background.

If you're a Unix veteran, you may be looking for the tried-and-true xterm . When you install Apple's X11 package, xterm is installed as well and will open by default upon launching the X11 application in /Application/Utilities. Unix vets might also seek out rxvt . While rxvt is not included with Mac OS X or the X11 package, you can install it using a package manager such as Fink or DarwinPorts (both of which were discussed in Chapter 2).





Running Mac OS X Tiger
Running Mac OS X Tiger: A No-Compromise Power Users Guide to the Mac (Animal Guide)
ISBN: 0596009135
EAN: 2147483647
Year: 2004
Pages: 166

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net