pidof
Print the PIDs of all processes with the given names. toybox
On Linux
Linux
pidof [-s] [-o omitpid[,omitpid...]] [NAME...]
-oOmit PID(s)-sSingle shot, only return one pid-xMatch shell scripts tooLinux
Get the ID of a process using its name.
List all process IDs with given name
pidof bashIdentifyList a single process ID with given name
pidof -s bashIdentify-sSingle shot, only return one pid toyboxList process IDs including scripts with given name
pidof -x script.pyIdentify-xMatch shell scripts too toyboxKill all processes with given name
kill $(pidof name)IdentifyTrips 1 Sigma rule: mediumTerminate Linux Process Via Kill by Tuan Le (NCSGroup)