How do I detect the used shell in Linux?

Method 1

echo $0

2024-07-11--04-31-43

askubuntu.com/a/590902

Method 2

echo $SHELL

2024-07-11--04-32-10

askubuntu.com/a/590903