echo $!

Category: Shell & Bash

echo $!

Print the PID of the last background process

Prints the PID of the most recently started background process. Useful for tracking or waiting for it.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.