Linux

How to find a specific process id for a running Application or Process in Linux

Written by Ian Carnaghan · 19 sec read >
  • Knowledge Base
  • Linux
  • How to find a specific process id for a running Application or Process in Linux

NOTE: Tested in Ubuntu 9.04

In this example we want to find the process id for Skype.

  1. In the command line type in the command below
    {codecitation style=”brush: bash;”}pgrep -l skype{/codecitation}
  2. This will list the process id together with the process name for Skype.
    -l = List the name of the process
    {codecitation style=”brush: bash;”}4322 skype{/codecitation}
  3. To list only the process id type the command without the -l option
    {codecitation style=”brush: bash;”}pgrep skype{/codecitation}
  4. This will only list the process id
    {codecitation style=”brush: bash;”}4322{/codecitation}

 

Last Updated On April 07, 2018
Written by Ian Carnaghan
I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment. In my spare time I teach undergraduate classes in web development. Profile

Leave a Reply

avatar
  Subscribe  
Notify of