Bash – get pid of last stared job You can run the command below to get the pid of last(latest) started job(process) on Linux. echo $$ Output: 4852