How To Get Shell Type and Version In Linux? – POFTUT

How To Get Shell Type and Version In Linux?

While using remote sessions we may need to know the type and version of the remote shell. Bash is popular but there may be different shells like sh, csh, ksh etc.

Using $SHELL Variable

Shells provide environment variables to give information about the shell and the environment. $SHELLenvironment variable can be used to get current she type. $SHELL variable information is not so reliable.

We can see that our current shell is bash

Using ps Command

We can use ps command with some parameters to get shell information like below.

  • We use ps command by providing the current process
Using Ps Command

Using Ps Command

LEARN MORE  Linux Bash Define, Call Functions

Leave a Reply

Your email address will not be published. Required fields are marked *

Enjoy this blog? Please spread the word :)