Which shell am I using?

Shell is a command interpreter that interprets the commands entered by you, runs against Unix/Linux Kernel, and provides the result on the standard output device. There are many shells developed since Unix came into existence.

Below is the list,

  • Bourne Shell – sh
  • C Shell – csh
  • T Shell – tcsh
  • Korn Shell – ksh
  • Bourn-again Shell – bash
  • Dash Shell
  • Z shell

Which shell are  you using? Let’s find out below.

Which Shell am I Using?

Unix creates all required configuration and setup when a user is created. Run grep <user> /etc/passwd to know the shell which you are using when you log in to Unix or Linux operating system.

Where <user> – login user name.

The below example answers the question,

$ grep imaginelinux /etc/passwd

Here, I am  using Bourne – sh shell.

Another way is by using the $SHELL variable. This variable is set with the default name as soon as you log in.

Just display the content of the variable using the echo command to find out the default shell.

$ echo $SHELL


I hope we answered all the questions you had for Unix/Linux Shells. You can also read below article go get more information on this topic.

Share This:
Scroll to Top