How to check what shell I am using in a terminal? What is the shell I am using in MacOS?
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
|
Several ways, from most to least reliable (and most-to-least "heavy"):
|
|||||||||||
|
|
I've found that the following works in the four shells I have installed on my system (bash, dash, zsh, csh):
The following works on zsh, bash, and dash, but not on csh:
|
|||
|
|
|
A note about some lighter implementations (Android phones, busybox, etc.): |
|||
|
|
|
As the question asks for the shell used and does not talk about the potential arguments passed to it, here is a way that avoid showing them:
|
|||
|
|
|
This works too:
|
|||||
|