Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

Try ps -eo pid,command PIDNUMBER

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.