lscpu

Display CPU architecture and topology information.

low risk

interactive breakdown — edit the command and press Explain
$ 
What it does

lscpu reads CPU details from /proc/cpuinfo and sysfs, displaying architecture, byte order, cores, threads, NUMA topology, caches, and CPU flags. Essential for capacity planning, performance tuning, and understanding NUMA effects.

Common flags
FlagMeaning
-J --jsonOutput in JSON format
-e --extendedShow extended readable format
-p --parseParseable per-CPU output
Examples
lscpuFull CPU topology and details · explain & risk-check →
lscpu | grep -E 'Core|Thread|Socket'Check physical vs logical CPU counts · explain & risk-check →
lscpu -J | jq '.lscpu[] | select(.field=="CPU(s):")'Extract CPU count in JSON pipeline · explain & risk-check →
Pro tip

Check 'NUMA node(s)' in lscpu output — applications unaware of NUMA topology can experience severe performance degradation on multi-socket servers.

Related
nproc uname free
Open the full explainer →More in System & Processes

Reference text is hand-written and may be incomplete — check man lscpu for your version. Test destructive commands on a non-production system first.