Pidof

From Wikipedia, the free encyclopedia

pidof is a Linux utility that returns the process identifier (PID) of a running process or processes. On other operating systems, pgrep and ps are often used instead.

pidof is implemented in the same program as killall5 (see readlink $(command -v pidof)), the Linux name for the System V killall program used by the runlevel scripts. pidof is usually a symbolic link to killall5, and the name the program is called under is what determines its behavior.

Some examples that return the process identifiers of several processes using pidof:

 $ pidof ntpd
 3580 3579
 
 $ pidof emacs
 22256
 
 $ pidof file
 10269
 
 $ pidof pidof
 23571

See also

External links

  • pidof(8): find the process ID of a running program  Linux Administration and Privileged Commands Manual
  • killall5(8): send a signal to all processes  Linux Administration and Privileged Commands Manual
This article is issued from Wikipedia. The text is available under the Creative Commons Attribution/Share Alike; additional terms may apply for the media files.