🧀 Learn Linux

Advanced · Observation System

pgrep: Check the process number by name

Put in free practice

Syntax

pgrep [-f] pattern

Options

-f
Compatible with matching by simulation process name

Examples

pgrep worker

Usage and sandbox support

Sandbox matches by process name; true -f matches the full command line.

Hands-on exercises

Full documentation ↗

Related commands