Skip to main content

Shell - Intro

Shell

The shell provides you with an interface to the UNIX system. It gathers input from you and executes programs based on that input. When a program finishes executing, it displays that program's output.

A shell is an environment in which we can run our commands, programs, and shell scripts. There are different flavors of shells, just as there are different flavors of operating systems. Each flavor of shell has its own set of recognized commands and functions.

In UNIX there are two major types of shells:

  1. The Bourne shell. If you are using a Bourne-type shell, the default prompt is the $ character.

    • Bourne shell (sh)
    • Korn shell (ksh)
    • Bourne Again shell (bash)
    • POSIX shell (sh)
    • Z shell (zsh)
  2. The C shell. If you are using a C-type shell, the default prompt is the % character.

    • C shell (csh)
    • TENEX/TOPS C shell (tcsh)
  3. Other shell

    • Friendly interactive shell (fish)

The original UNIX shell was written in the mid-1970s by Stephen R. Bourne while he was at AT&T Bell Labs in New Jersey.

The Bourne shell was the first shell to appear on UNIX systems, thus it is referred to as "the shell".

The Bourne shell is usually installed as /bin/sh on most versions of UNIX. For this reason, it is the shell of choice for writing scripts to use on several different versions of UNIX.

In this tutorial, we are going to cover most of the Shell concepts based on Borne Shell.

apt - Advance Package Tool

http://tldp.org/LDP/Bash-Beginners-Guide/html/index.html