Show which shell is running
Here are some examples of how you can find out which shell is running from the terminal:
Using the
$SHELL
environment variable:echo $SHELLUsing the
ps
command:ps -p $$Using the
echo
command with the$0
parameter:echo $0Using the
ps
command with the-o
option:ps -o comm= -p $$
These commands will help you identify the current shell you are using in your terminal.
Last modified: 28 November 2024