Many different Linux shells are available. This book describes the two most popular shells:
The Bourne-Again shell (bash), which is based on the Bourne shell (sh). bash is the default Linux shell and the most commonly used.
tcsh, an extension of the C shell, csh, that is included instead of csh in Linux distributions.
Most systems have more than one shell, and it's not uncommon for people to use one shell for writing shell scripts and another for interactive use. Other popular shells include the Korn shell (ksh) and the Z shell (zsh); both of these are Bourne-shell compatible.
When you log in, the system determines which shell to run by consulting your entry in /etc/passwd. The last field of each entry calls a program to run as the default shell. For example:
Program name |
Shell |
---|---|
/bin/sh |
bash |
/bin/bash |
bash |
/bin/csh |
tcsh |
/bin/tcsh |
tcsh |
You can change to another shell by typing the program name at the command line. For example, to change from bash to tcsh, type:
$ exec tcsh
Copyright © 2003 O'Reilly & Associates. All rights reserved.