In bash, the PID of a shell script's subshell process is stored in a special variable called $$. This variable is read-only, and you cannot modify it in a shell script1. You can use echo $$ to get the PID of the current bash shell you are using2. Therefore, when the command echo $$ outputs 12942, it means that the PID of the current shell is 12942. References: * [LPI Linux Essentials - Topic 103: Command Line Basics] * [Bash Special Parameters] * How to get the process ID (PID) of a shell script * How to know the process id of current bash session?