>_ linuxcommand.dev
Shell

$!

PID of the most recently started background process.

Ubuntu Debian Arch Fedora CentOS SUSE Alpine macOS FreeBSD
Verified: 2026-05-12
Syntax
$command & echo $!
Examples
$sleep 60 & echo $!
$longjob & pid=$!
Typical use cases
?
Standard usage
$! --help
Note Often combined with wait or kill for job control.
Export