There are different types of shells available on any linux machine. Primarily we need to understand about, Bourne shell, Korn shell and bash shell etc. But before getting into types of shell, let's understand a bit more on Shell.
It is an interface between user and kernel. It is an interpreter that executes the commands given by the user. Shell is not a part of the kernel but it uses the kernel to execute the commands.
Every shell will do the same tasks or functions but the syntax of commands are different for different shells and provide different built-in functions.
In MS-DOS the shell is command.com and the shell in windows the shell is power shell.
1. /bin/sh represents Bourne shell which is default shell in solaris.
2. /bin/bash represents Bourne again shell. This shell is improved version of Bourne shell. This is the default shell in Linux.
3. /bin/dash represents DebianAlmquist shell. It is the default shell in Debian OS.
4. /bin/csh represents c-shell.
5. /bin/tcshtepresents advanced c-shell.
From the above output all shells are available in /bin directory. Except for one thing that is “/sbin/nologin”.
For example I am creating a user for the authentication of FTP server. For this user there is no need to have a shell to download the files. At that situation as an admin we can create a userid with no shell.
This makes possible by using “/sbin/nologin” with attribute –s of “useradd” command. To know about creating the user having noshell click here.
To know the default shell of the particular Linux operating system the command is,
To change the current working shell simply enter the individual shell command in the terminal.
If you want to change the shell from bash to c- shell simply enter the command as “csh”. To change to bash shell, type "bash" in terminal window.
To check the current working shell type the command # echo $0.
To revert from that shell simply type "exit" on the terminal.