Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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

 
discard

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.