Полезная информация

UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: 3.2 Purpose of the ShellChapter 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:

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 programYour shell will be the:
name is:
/bin/shBourne shell
/bin/rshRestricted Bourne shell
/bin/jshBourne shell, including job control
/bin/kshKorn shell
/bin/rkshRestricted Korn shell
/bin/cshC 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 ShellUNIX in a Nutshell: System V EditionNext: 3.4 Common Features
3.2 Purpose of the ShellBook Index3.4 Common Features

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