Fundamentals 4 min read

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.

Liangxu Linux
Liangxu Linux
Liangxu Linux
How to Inspect CPU Model, Cores, and Hyper‑Threading on Linux

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.637

Counting 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
2

Finding 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        : 10

Logical 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
40

Detecting 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         : 20

By 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.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxCPUsystem-monitoringHyper-threadingprocfs
Liangxu Linux
Written by

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.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.