How do I find out what shell I am using on Linux/Unix?

Originally published at:

Both Linux and Unix provides various shell out of the box. One can find bash (Bourne Again shell), ksh (Korn shell), csh (C shell)/tcsh (TC shell), sh (Bourne shell) and more installed by default. However, how do you check which shell am I using? What is the best way to find out what shell I am using on Linux? The echo $SHELL is not so reliable. This page explains how to find out which shell I am using at a Linux, MacOS, FreeBSD, or Unix-like systems.

This article is still useful (and also the very first hit in a search engine result for “identify shell Linux”) -

Correction: “at the movement” → “at the moment”

Other corrections (eight):

“default shell defined” → “default shell is defined” (missing verb)

“Look like” → “It looks like”

“Let us summaries” → “Let us summarise” (true typo)

“from above commands” → “from the above commands” (missing article)

“try out following” → “try out the following” (missing article)

“necessarily shell” → “necessarily the shell” (missing article)

“How to find out what shell I am using?” → “How can I find out what shell I am using?” (question formation, QUASM - www DOT youtube DOT com/watch?v=kS5NfSzXfrI)))

“follows :” → “follows:” (space)

1 Like

Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki