System
lscpu
Show CPU architecture and processor information.
cpuarchitecturecoressystemhardware
Additional Notes
lscpu displays CPU architecture information collected from sysfs and /proc/cpuinfo. It shows architecture, CPU count, threads, cores, sockets, model name, virtualization support, caches, and CPU flags.
It is useful when checking performance, virtualization support, kernel builds, and binary compatibility.
Syntax
lscpu [options]
Parameters
options: Flags that change howlscpubehaves.
Common Options
-e: Show extended CPU table.-p: Show parseable output.-J: Output JSON when supported.--online: Show online CPUs.--offline: Show offline CPUs.
Examples
lscpu
Show CPU information.
lscpu | grep "Model name"
Show CPU model.
lscpu | grep Virtualization
Check virtualization support.
lscpu -e
Show CPU table.
Practical Notes
Architecturematters when downloading binaries.CPU(s)shows logical CPUs, including threads.- Check virtualization before using KVM or some emulators.
- Use
nprocwhen you only need the number of processing units.