What is shell ?

Shell is a program which allows users to interact with computers.

Shell is an command language interpreter that executes commands read from the standard input device (keyboard) or from a file. Several shells available fo Linux and UNIX operating systems are :

SH (Bourne Shell) Old Unix Shell.
BASH (Bourne-Again Shell) GNU
CSH (C Shell) BSD
TCSH (Popular extension of C Shell)
KSH (Korn Shell) Bell Labs
ZSH (Popular Extension of Korn Shell)
RSH (Remote Shell) TCP/IP

User’s use keyboard to send commands to system. The interface they are using is called CLI (Command Line Interface). If you are normal user (non administrator) prompt is called
“$” prompt (dollar prompt). If you are administrator (super user) then prompt is called
“#” prompt (pound /hash).

If you want to know how many shells are supported by your system then use following command.
$cat /etc/shells
#cat /etc/shells
Note : Above command will display content of file “/etc/shells” on your screen.

How do I find out what shell I’m using?

As We mentioned earlier that shell is a program which allows users to interact with system, we can find out which shell you are using right now using “ps” command with -p switch.
ps -p $$
So what is $ argument passed to -p option? Remember $ returns the PID (process identification number) of the current process, and the current process is your shell. So running a ps on that number displays a process status listing of your shell. In that listing you will find the name of your shell (look for CMD column) .

nilesh@gnulinux:~$ ps -p $$
  PID TTY          TIME CMD
 3301 pts/0    00:00:00 bash

What is shell ? Unix / Linux / centos / redhat / suse / fefora / bsd / solaris / Aix
How to find out which shell I am using ?
what is shell prompt ? what is difference between $ (dollar) and #(pound)(hash) prompt?
About shell, command interpreter program.
What is shell script?

Share this post

Post Comment