Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

How could I find out what is the path to the binary file from a process? Like:

[usern@hostn ~]$ ps aux | grep -i gnome-session
gbor      2844  0.0  0.2  38072  7152 ?        Ssl  05:53   0:00 gnome-session
[usern@hostn ~]$ lsof | grep -i gnome-session
gnome-ses  2844      gbor  txt       REG      253,1   252592     792784 /usr/bin/gnome-session
[usern@hostn ~]$ 

Without using "lsof"

share|improve this question
up vote 3 down vote accepted

/proc/<PID>/exe is a symlink to the process's executable.

share|improve this answer
Pointing out readlink /proc/<PID>/exe before anyone tries to parse the hell out of ls output. – grawity May 6 '11 at 12:21

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.