Contents
How do I find my shell name?
To get the name of the current shell, Use cat /proc/$$/cmdline . And the path to the shell executable by readlink /proc/$$/exe . ps is the most reliable method. The SHELL environment variable is not guaranteed to be set and even if it is, it can be easily spoofed.
How do I know if I have bash or zsh?
Update your Terminal preferences to open the shell with the command /bin/bash , as shown in the screenshot above. Quit and restart Terminal. You should see “hello from bash”, but if you run echo $SHELL , you will see /bin/zsh .