How To Get Shell Type and Version In Linux?

RSS
FACEBOOK
FACEBOOK
PINTEREST
PINTEREST
LINKEDIN
INSTAGRAM

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 provides environment variables to give information about the shell and the environment. $SHELL environment 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 current process
Using Ps Command

Using Ps Command

RSS
FACEBOOK
FACEBOOK
PINTEREST
PINTEREST
LINKEDIN
INSTAGRAM
LEARN MORE  Linux Bash For Loop Range Examples

Leave a Reply

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

Enjoy this blog? Please spread the word :)