echo $$ vs echo $SHELL
"What's running vs. what's configured"
These two variables look similar but answer completely different questions.
echo $$ → “What process am I?”
It gives you the PID (Process ID) of the current shell — a number assigned by the OS to identify the running process. It changes every time a new shell is spawned.
zsh
echo $$ # → 4821echo $SHELL → “What shell am I configured to use?”
It gives you the path to your login shell as set in /etc/passwd (or your system’s user config). It doesn’t tell you what’s running right now — just what your default is.
zsh
echo $SHELL # → /bin/zsh“You are what you do, not what you say you’ll do.”
— Carl Jung


