home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: 3.2 Purpose of the Shell Chapter 3
The UNIX Shell: An Overview
Next: 3.4 Common Features
 

3.3 Shell Flavors

Many different UNIX shells are available. This quick reference describes the three most popular shells:

  • The Bourne (or standard) shell, the most compact shell but also the simplest.

  • The Korn shell, a superset of the Bourne shell that lets you edit the command line.

  • The C shell, which uses C syntax and has many conveniences.

Most systems have more than one shell, and people will often use the Bourne shell for writing shell scripts and will use 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 calls a program to run as the default shell. For example:

If the program Your shell will be the:
name is:
/bin/sh Bourne shell
/bin/rsh Restricted Bourne shell
/bin/jsh Bourne shell, including job control
/bin/ksh Korn shell
/bin/rksh Restricted Korn shell
/bin/csh C shell

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 C shell, type:

$ 

exec csh


Previous: 3.2 Purpose of the Shell UNIX in a Nutshell: System V Edition Next: 3.4 Common Features
3.2 Purpose of the Shell Book Index 3.4 Common Features

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System