Search This Blog

Monday, November 12, 2018

pgrep, pkill - look up or signal processes based on name and other attributes

pgrep looks through the currently running processes and lists the process IDs which match the selection criteria to stdout. All the criteria have to match. For example,
$ pgrep -u root sshd
will only list the processes called sshd AND owned by root.