commands.sh

pidof

linux

Get the ID of a process using its name.

More info →

Examples (4)

List all process IDs with given name

List a single process ID with given name

List process IDs including scripts with given name

pidof -x script.py

Kill all processes with given name

kill $(pidof name)
made by @shridhargupta | data from tldr-pages