3.3. Shell Flavors
Most systems have more than one shell, and people will often use the Bourne shell for writing shell scripts and another shell for interactive use.
The /etc/passwd file determines which shell takes effect during your interactive Unix session. When you log in, the system checks your entry in /etc/passwd. The last field of each entry names a program to run as the default shell. For example:
You can change to another shell by typing the program name at the command line. For example, to change from the Bourne shell to the Korn shell, type:
$ exec ksh
Note that on most systems, rsh is the “remote shell” for executing commands on a remote system across a network. On some systems, though, rsh is indeed the restricted shell, and remsh is the remote shell. Check your local documentation.
3.3.1. Which Shell Do I Want?
If you are new to Unix, picking a shell may be a bewildering question. Before ksh was commonly available, the general advice was to use csh for interactive use (because it supported job control and had other features that made it a better interactive shell than the Bourne shell), but to use the Bourne shell for scripting (because it is a more powerful programming language, and more universally available).
Today, ksh is widely available; it is upwardly compatible with the Bourne shell as a programming language, and it has all the interactive capabilities of csh, and more. If it is available, it is probably your best choice.
Copyright © 2003 O'Reilly & Associates. All rights reserved.