What is Shell?
In Unix, the shell is a program that interprets commands and acts as an intermediary between the user and the inner workings of the operating system.
It is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and for Unix-like systems.
It makes basic facilities such as multitasking and piping easy to use, and it adds useful file-specific features such as wildcards and I/O redirection.
The prompt, $, which is called command prompt, is issued by the shell. While the prompt is displayed, you can type a command.
The shell reads your input after you press Enter. It determines the command you want executed by looking at the first word of your input. A word is an unbroken set of characters. Spaces and tabs separate words.
Mon Sep 8 14:03:04 UTC 2014
Types of Shell
There are four common shells in use:
· the Bourne shell
· the Korn shell
· the C shell
· the Bash shell (Bourne Again Shell)
Reletionship Diagram for above four shells
SELECTING A SHELL
When you are provided with a UNIX account,the system administrator chooses a shell for you.
To find out which shell was chosen for you, look at your prompt.
If you have a $ prompt, you’re probably in a Bash, Bourne or a Korn shell.
If you have a % prompt, you’re probably in a C shell.
chsh is the utilitity which allows you to change your default login shell.
It prompts you for the full pathname of the new shell,which is then used as your shell for subsequent logins.
- In order to use
chsh, you must know the full pathnames of the three shells.
Here they are: