Interview Q&A / Linux & Shell

IntermediateQuick answer1 min readUpdated 3 Oct 2026

What is /proc in Linux, and is it a real folder on disk?

SHORT ANSWER

/proc is a virtual file system created by the kernel in memory. Its files show live information about running processes and the system, such as /proc/cpuinfo and /proc/PID/status. Nothing in it is stored on disk.

Explain it simply

/proc is like the dashboard of a car. The dashboard is not an engine part you can take out; it simply displays what the engine is doing right now. The kernel generates the files in /proc when you read them.

Each running process gets a folder named by its PID, for example /proc/1234/, with files such as cmdline (how it was started), status (memory and state) and fd/ (its open files). System-wide files include /proc/cpuinfo, /proc/meminfo and /proc/uptime.

Tools like ps, top and free mostly just read these files and format them nicely. File sizes show as 0 because there is no stored content.

Example

bash
cat /proc/uptime
# 35120.45 270000.12      (seconds since boot, idle seconds)
head -2 /proc/meminfo
# MemTotal:        8023456 kB
# MemFree:         1203344 kB
cat /proc/$$/cmdline    # the current shell's own command

What to say in the interview

"/proc is a virtual file system exposed by the kernel. It has no disk storage; reading a file asks the kernel for live data. Each process has a /proc/PID folder, and tools like ps, top and free read from here."

Common mistakes

  • Trying to edit or free space in /proc; it takes no disk space.

#linux#filesystem#processes

Related questions

Practise more Linux & Shell questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Linux & Shell quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.