Which file exposes CPU information in Linux?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

Which file exposes CPU information in Linux?

Explanation:
Linux exposes per-processor details via the /proc/cpuinfo file in the virtual /proc filesystem. This file contains a block of information for each logical CPU, including fields like processor (the CPU number), vendor_id, model name, cpuMHz, cache size, and various feature flags. On systems with multiple cores or hyper-threading, you’ll see multiple blocks—one for each CPU—so you can determine how many logical processors you have and details about each. The other files mentioned provide different data: /proc/meminfo is about memory usage, /proc/uptime shows how long the system has been up and idle time, and /proc/loadavg shows system load averages. So /proc/cpuinfo is the file that exposes CPU information. You can view it with cat /proc/cpuinfo or use a more user-friendly tool like lscpu to summarize the same data.

Linux exposes per-processor details via the /proc/cpuinfo file in the virtual /proc filesystem. This file contains a block of information for each logical CPU, including fields like processor (the CPU number), vendor_id, model name, cpuMHz, cache size, and various feature flags. On systems with multiple cores or hyper-threading, you’ll see multiple blocks—one for each CPU—so you can determine how many logical processors you have and details about each. The other files mentioned provide different data: /proc/meminfo is about memory usage, /proc/uptime shows how long the system has been up and idle time, and /proc/loadavg shows system load averages. So /proc/cpuinfo is the file that exposes CPU information. You can view it with cat /proc/cpuinfo or use a more user-friendly tool like lscpu to summarize the same data.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy