commands.sh

pgrep

all

Find or signal processes by name.

More info →

Options (3)

-a, --list-fullboolean

Also display the full command

Example: pgrep {{[-a|--list-full]}} {{process_name}}
-f, --fullboolean

Search for processes including their command-line options

Example: pgrep {{[-f|--full]}} "{{process_name}} {{parameter}}"
-u, --euidboolean

Search for processes run by a specific user

Example: pgrep {{[-u|--euid]}} {{username}} {{process_name}}

Examples (4)

Return PIDs of any running processes with a matching command string

pgrep process_name

Also display the full command

pgrep [-a|--list-full] process_name

Search for processes including their command-line options

pgrep [-f|--full] "process_name parameter"

Search for processes run by a specific user

pgrep [-u|--euid] username process_name
made by @shridhargupta | data from tldr-pages