O'Reilly logo

Linux in a Nutshell, Fourth Edition by Aaron Weber, Stephen Figgins, Ellen Siever

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Shell Flavors

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required