cpuid
Display CPU identification and feature information
TLDR
Display information for all CPUs
Display information only for the current CPU
Display raw hex information with no decoding
SYNOPSIS
cpuid [OPTION]...
PARAMETERS
-1
Dump CPUID leaf 0x00000001 (processor info and feature flags)
-2
Dump CPUID leaf 0x00000002 (cache and TLB descriptors)
-3
Dump CPUID leaf 0x00000003 (processor serial number, often reserved)
-4
Dump CPUID leaf 0x00000004 (deterministic cache parameters)
-a, --all
Dump all basic CPUID leaves (0x00000000 to max basic)
-e, --extended
Dump extended CPUID leaves (0x80000000 to max extended)
-l, --level=<LEVEL>
Dump specific leaf LEVEL (decimal or 0xHEX)
-r, --raw
Output raw hex register values without decoding
-f, --input-file=<FILE>
Read CPUID values from FILE instead of executing instruction
-o, --output-file=<FILE>
Write output to FILE
--help
Display help and exit
--version
Output version information
DESCRIPTION
The cpuid command is a Linux utility that queries x86 processors (Intel, AMD, etc.) using the CPUID machine instruction to retrieve detailed hardware information. Introduced by Intel in 1993 for the Pentium processor, CPUID allows software to obtain the CPU vendor ID, family, model, stepping, brand string, feature flags (e.g., SSE, AVX, AES-NI), cache and TLB configurations, logical processor count, and extended attributes like power management capabilities.
This tool is invaluable for system administrators, kernel developers, and hardware enthusiasts to verify CPU specs, diagnose compatibility issues, benchmark features, or debug virtualization environments. It decodes raw register values (EAX, EBX, ECX, EDX) from specific leaf (function number) inputs into human-readable output, often with hex dumps.
Unlike high-level tools like lscpu, cpuid provides low-level, exhaustive dumps across basic (0x00000000+), extended (0x80000000+), and hypervisor (0x40000000+) leaves. It typically executes in user space via kernel-emulated CPUID or direct hardware access, supporting multi-core systems by reporting per-CPU data if needed.
Output includes processor signature, instruction set extensions, thermal/power features, and more, aiding in software optimization and hardware validation.
CAVEATS
x86/x86_64 only; output may differ in VMs (shows guest CPUID); some leaves vendor-specific or reserved; requires no special privileges but kernel may limit on secureboot.
TYPICAL USAGE
cpuid -1 shows SSE/AVX flags.
cpuid -a -e for full dump.
OUTPUT EXAMPLE
Leaf 0x1: eax=0x0000000d ebx=0x00000000 ecx=0x00000000 edx=0x078bfbff
Vendor: GenuineIntel
Family:6 Model:142
HISTORY
CPUID instruction debuted in Intel Pentium (1993); first cpuid tools emerged ~2000 (e.g., Eijhout's x86info). Modern versions by Moshe Bar (cpuid package since 2001, actively maintained; latest ~2023) integrate hypervisor leaves for KVM/VMware detection. Integrated into distros like Debian/Ubuntu/Fedora.


