How to find a program’s process id (pid)
Here’s an easy way to get the pid of a running process.
Running the “pidof” command will return the pid(s) for a running program. See sample below,
danny@pandora:~> pidof syslog-ng
2043
danny@pandora:~> pidof acpid
2045
danny@pandora:~> pidof /usr/bin/firefox
14408
danny@pandora:~> pidof /usr/bin/compiz
27164
danny@pandora:~> pidof /bin/bash
27011 17339 16792 16477 15151 14403
Simple right!?
Tags: bash, CLI, command line, commands, HowTo, Linux, linux commands



















