Notes to Self

Alex Sokolsky's Notes on Computers and Programming

Looking into Process Details

man proc, man proc/pid

Process Details

Given a PID of the process….

Path:

ls -la /proc/PID/exe

Note the use of self to refer to the PID of the querying process:

$ ls -la /proc/self/exe
lrwxrwxrwx 1 ubuntu ubuntu 0 Apr 30 17:58 /proc/self/exe -> /usr/bin/ls

Current working directory:

ls -la /proc/PID/cwd

Command line:

cat /proc/PID/cmdline