pgrep [options] patternArguments explained
- Options adjust output or behavior.
- Arguments name the files, services, hosts, or values the command should work with.
Common examples
pgrep sshdPrints PIDs for matching process names.
pgrep -af pythonShows PIDs and full command lines containing python.
| Field | Details |
|---|---|
| Command | pgrep |
| Category | Processes |
| Primary use | Finds process IDs by pattern. |
| Syntax | pgrep [options] pattern |