echo $0

Category: Terminal Configuration

echo $0

Show the shell you are currently running

Unlike $SHELL (which shows your login shell), $0 shows the actual shell process running right now. Useful when you've typed `zsh` inside a bash session — $SHELL still says bash but $0 says zsh.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.