Which directory provides kernel information via a virtual filesystem?

Study for the OSCP Linux Exam. Use our flashcards and multiple-choice questions to test your skills. Each query comes with detailed hints and explanations to enhance your preparedness. Get ready to conquer the exam!

Multiple Choice

Which directory provides kernel information via a virtual filesystem?

Explanation:
Kernel information is exposed through /proc, a procfs virtual filesystem. It presents kernel and process data as files, not as real disk files, so reading those paths queries the running kernel for current state. For example, /proc/cpuinfo shows CPU details, /proc/meminfo shows memory statistics, and /proc/version reveals the kernel version. This interface exists specifically to let user-space programs access kernel information in a simple, uniform way. Other virtual filesystems serve related but different purposes: /sys (sysfs) exposes device and driver attributes and objects, /dev provides device nodes for interacting with hardware, and /run holds runtime data. None of these are the standard source for broad kernel information in the same way as /proc.

Kernel information is exposed through /proc, a procfs virtual filesystem. It presents kernel and process data as files, not as real disk files, so reading those paths queries the running kernel for current state. For example, /proc/cpuinfo shows CPU details, /proc/meminfo shows memory statistics, and /proc/version reveals the kernel version. This interface exists specifically to let user-space programs access kernel information in a simple, uniform way.

Other virtual filesystems serve related but different purposes: /sys (sysfs) exposes device and driver attributes and objects, /dev provides device nodes for interacting with hardware, and /run holds runtime data. None of these are the standard source for broad kernel information in the same way as /proc.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy