header

pidof COMMAND:

pidof COMMAND:
pidof linux command is used to find the process ID of a running program.

SYNTAX:
The Syntax is
pidof [options..] program

OPTIONS:
-sSingle shot - this instructs the program to only return one pid.
-xScripts too - this causes the program to also return process id's of shells running the named scripts.
-oTells pidof to omit processes with that process id. The special pid %PPID can be used to name the parent process of the pidof program, in other words the calling shell or shell script.


EXAMPLE:
  1. To find a process id of a particular console:
    pidof -s console

    This command prints the process id of the console.

    3189

No comments: