Take the 2-minute tour ×

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?

share|improve this question
add comment

2 Answers

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:

cat /proc/<PID>/cmdname
share|improve this answer
add comment

Try ps -eo pid,command PIDNUMBER

share|improve this answer
add comment

Your Answer


