How to Inspect CPU Model, Cores, and Hyper‑Threading on Linux
This guide shows Linux users how to retrieve detailed CPU information—including model, frequency, physical and logical core counts, and hyper‑threading status—by querying /proc/cpuinfo with simple command‑line filters.
Viewing CPU Model and Frequency
Use /proc/cpuinfo together with grep to display the CPU model name and its operating frequencies.
# CPU model
cat /proc/cpuinfo | grep "model name" | uniq
model name : Intel(R) Xeon(R) CPU E5-2640 v4 @ 2.40GHz
# CPU frequency
cat /proc/cpuinfo | grep "cpu MHz" | uniq
cpu MHz : 1547.537
cpu MHz : 1250.590
cpu MHz : 2183.637Counting Physical CPUs
Count distinct physical id entries to determine how many physical CPU packages are installed.
# Physical CPU count
cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l
2Finding Cores per Physical CPU
Read the cpu cores field to learn how many cores each physical CPU provides.
# CPU cores per socket
cat /proc/cpuinfo | grep "cpu cores" | uniq
cpu cores : 10Logical CPU Count
Logical CPUs are reported by the processor entries; the total equals physical CPUs multiplied by cores per CPU, doubled when hyper‑threading is active.
# Logical CPU count
cat /proc/cpuinfo | grep "processor" | wc -l
40Detecting Hyper‑Threading
Compare the cpu cores and siblings values; if siblings is greater, hyper‑threading (HT) is enabled.
# HT detection
cat /proc/cpuinfo | grep -e "cpu cores" -e "siblings" | sort | uniq
cpu cores : 10
siblings : 20By combining these commands, users can quickly assess whether their machine’s CPU performance is limited by core count, frequency, or the presence of hyper‑threading, which is essential when selecting hardware for machine‑learning workloads.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
