Search

Finding the process id from its name

Every process in linux has a unique process id, which can be used to control the process.
To find the process id from the process name we can use the command pidof
For e.g.


2 comments:

  1. This will also do the job
    $ pgrep -f firefox
    15223
    15224
    15225
    15226
    15227
    15228

    pkill can kill all the matching processes instead of showing them
    Just my 0,02

    ReplyDelete
    Replies
    1. yes, pgrep is also a very useful command.
      Thanks for the info.

      Delete