Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 358 Bytes

pid-of-the-current-shell.md

File metadata and controls

23 lines (15 loc) · 358 Bytes

PID Of The Current Shell

$ expands to the process ID of the shell. So, you can see the PID of the current shell with echo $$.

> echo $$
36609

> zsh

> echo $$
45431

> exit

> echo $$
36609

See the Special Paramaters section of man bash for more details.

source