Frequently Asked Question
What is /proc and what's it for?
/proc is a virtual filesystem, the files don't live on disk; the kernel
synthesises their contents whenever you read them. It is the main way the kernel
exposes runtime information to user space. /proc/cpuinfo gives CPU details,
/proc/meminfo memory statistics, /proc/mounts the active mount table,
/proc/version the kernel version string, and so on.
For each running process there is a /proc/<PID>/ directory: /proc/<PID>/cmdline
is the command, /proc/<PID>/maps is its address-space layout, /proc/<PID>/fd/
links each open file descriptor to its file. Many sysadmin tools (ps, top,
lsof) are just nicely-formatted views over /proc.