Re: How to test what shell I'm using in terminal?
I've found several ways, from most to least reliable. The following works in the four shells I have installed on my system (bash, zsh, csh, tcsh):
# ps -p $$ PID TT STAT TIME COMMAND 14143 0 Ss 0:00,03 -bash (bash)
# echo $0 -bash
3) Check $SHELL; this is a last resort, as it specifies your default shell and not necessarily the current shell.
# echo $0 csh # echo $SHELL; /usr/local/bin/bash