0

What is the best way to get the application name when you already have the process id?

  • Best way would be to ask this kind of question at [Super User](https://superuser.com/), where it belongs. – f_puras Oct 05 '15 at 13:15
  • 1
    duplicate of : http://superuser.com/questions/632979/if-i-know-the-pid-number-of-a-process-how-can-i-get-its-name – nafas Oct 05 '15 at 13:17
  • 1
    Possible duplicate of [Get process name by PID](http://stackoverflow.com/questions/4189717/get-process-name-by-pid) –  Oct 05 '15 at 13:24

1 Answers1

0

You can use ps:

ps -p 1337 -o comm=

Where -p is for pid and -o for the output format.

Diogo Rocha
  • 9,759
  • 4
  • 48
  • 52