What is the /proc filesystem?
Why Interviewers Ask This
Interviewers ask this to evaluate whether you have the depth of knowledge needed to mentor others and lead technical decisions. The expected answer goes beyond definitions into practical implications and real-world consequences.
Answer
/proc is a virtual filesystem (pseudo-filesystem) that provides a window into the kernel's internal state — it exists only in memory, not on disk. Each running process has a directory /proc/PID/ containing: cmdline (command line), environ (environment), fd/ (open file descriptors), maps (memory mappings), status (process state). Key system files: /proc/cpuinfo (CPU details), /proc/meminfo (memory stats), /proc/net/ (network stats), /proc/sys/ (kernel parameters tunable via sysctl). Example: sysctl -w net.ipv4.ip_forward=1 or echo 1 > /proc/sys/net/ipv4/ip_forward enables IP forwarding. Persist with /etc/sysctl.conf.
Pro Tip
Before answering, structure your response: one-line definition → real-world analogy → concrete example from a project. This makes even complex Linux / Shell Scripting answers easy to follow.
Previous
What is systemd and how do you use it?
Next
How do you write robust, production-grade shell scripts?