~1 min read|
If you switch between shells, it might be handy to determine which one is currently running.
One way to do that is to check your process status (
To find the process id (PID) of the current instance of your shell, use:
$ echo "$$"
You can then pass this into the
ps utility to find a specific PID with the
$ ps -p "$$" PID TTY TIME CMD 21373 ttys001 0:00.69 -zsh
Hi there and thanks for reading! My name's Stephen. I live in Chicago with my wife, Kate, and dog, Finn. Want more? See about and get in touch!