If I know the PID number of a process can I know its name?

7,025

Solution 1

Did you try either:

ps -p <PID> -o cmd

or if you only want the command name

ps -p <PID> -o comm

Or try this one (tested on Ubuntu):

cat /proc/<PID>/cmdline

Solution 2

Try ps -eo pid,command PIDNUMBER

Solution 3

try top in terminal it will give you all details of PID and Process name

Share:
7,025

Related videos on Youtube

AndreaNobili
Author by

AndreaNobili

Updated on September 18, 2022

Comments

  • AndreaNobili
    AndreaNobili over 1 year

    If I have the PID number for a process (on a UNIX machine), how can I know the name of its associated process? What do I have to do?