Linux Signals and Job Control/Test whether PID exists

Check whether a process exists and whether you can signal it.

Section: Signals Reference and Delivery

Test whether PID exists

bash
bash
kill -0 1234
Explanation

Check whether a process exists and whether you can signal it.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Signals Reference and Delivery
Signal a process group
Signal every process in a process group.
OpenIn sheetbashsame section
Trap shell signals
Handle a signal in a shell script.
OpenIn sheetbashsame section
Signal oldest match
Signal only the oldest matching process.
OpenIn sheetbashsame section
Signal newest match
Signal the newest matching process.
OpenIn sheetbashsame section
Count matching processes
Count processes that match a pattern.
OpenIn sheetbashsame section
Signal by number
Send a custom signal to matching processes.
OpenIn sheetbashsame section