[pappy@chmodx]:$ man pgrep

$ pgrep

Look up processes based on name and other attributes

DOCUMENTEDProcessesUbuntu 24.04 LTS baseline

Synopsis

pgrep [options] pattern

What it does

Examples

Find processes whose name matches
pgrep nginx
Show process IDs and names
pgrep -a nginx

Important details

These examples are intentionally conservative. Command behavior can still depend on filesystem state, permissions, locale, shell, installed package version, and other system configuration. For exact option semantics, the linked authoritative documentation is the source of truth.