Section 5.1. Introduction


[Page 168 (continued)]

5.1. Introduction

A shell is a program that is an interface between a user and the raw operating system. It makes basic facilities such as multitasking and piping easy to use, as well as adding useful file-specific features such as wildcards and I/O redirection. There are three shells in common use today, listed here in approximate order of popularity:

  • the Bourne Again shell (bash)

  • the Korn shell (ksh)

  • the C shell (csh)

All of these shells come with Linux, but they may not all be installed on your system depending on your selection of optional packages. The names vary a bit between UNIX and Linux systems. The major difference is that /bin/sh is the Bourne shell on a UNIX system but on a Linux system it is a symbolic link to /bin/bash. The shells and their common naming are shown in Figure 5-1.

Figure 5-1. Comparison of Linux and UNIX shell names.

Shell

Linux

UNIX

Bash

sh or bash

bash

Korn shell

ksh, pdksh, or zsh

ksh

C shell

csh or tcsh

csh



[Page 169]

The shell that you use is a matter of personal taste based on its power, compatibility, and availability. The Korn shell was designed to be upward compatible with the original UNIX Bourne shell, and incorporates the best features of the Bourne and C shells plus some more of its own. Bash also takes a "best of all worlds" approach, including features from all the other major shells. Bash is the default shell on Linux systems, but we will examine all three shells in the subsequent chapters.




Linux for Programmers and Users
Linux for Programmers and Users
ISBN: 0131857487
EAN: 2147483647
Year: 2007
Pages: 339

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net