% echo $0
/usr/bin/zsh
% ps -p $$
PID TTY TIME CMD
29189 pts/1 00:00:00 zsh
If necessary, the last command can be parsed as follows.
% ps -hp $$|awk '{print $5}'
/usr/bin/zsh
{{tag>["What shell am I using?"]}}
==== related pages ====
* [[Change the default shell]]
* [[Difference between SHELL and 0 | What is the difference between \$SHELL and \$0?]]