Shell
$!
PID des zuletzt gestarteten Hintergrundprozesses.
Ubuntu
Debian
Arch
Fedora
CentOS
SUSE
Alpine
macOS
FreeBSD
Verifiziert: 2026-05-12
Syntax
$command & echo $!
Beispiele
$sleep 60 & echo $!
$longjob & pid=$!
Typische Anwendungsfälle
?
Standardverwendung
$! --help
Hinweis
Wird oft mit wait oder kill für Job-Steuerung genutzt.
Export