Accurate CPU information supports capacity planning, performance troubleshooting, and compatibility checks for software and virtualization workloads. Details such as core count, architecture, and supported instruction sets indicate how much parallel work a system can handle and which binaries are appropriate.
On Linux, most CPU metadata lives in virtual files such as /proc/cpuinfo and entries under /sys that are populated by the kernel. Command-line tools like lscpu, dmidecode, and hwinfo read those structures and present fields such as model name, frequency, cache sizes, and vulnerability status in a structured format.
Some queries require elevated privileges because firmware tables and low-level descriptors are only accessible to root. Running dmidecode with sudo exposes manufacturer and serial identifiers, while utilities like lscpu remain safe for unprivileged users and can be executed over remote shells without risk of changing configuration. Combining these tools surfaces both high-level summaries and hardware-level identifiers useful for inventory, licensing, and security auditing.
Steps to check CPU information in Linux:
- Open a terminal on the Linux system.
- Display summarized CPU information.
$ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Model name: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz CPU(s): 16 Thread(s) per core: 2 Core(s) per socket: 8
- Check the CPU architecture.
$ lscpu | grep '^Architecture' Architecture: x86_64
- Identify the CPU op-mode.
$ lscpu | grep '^CPU op-mode' CPU op-mode(s): 32-bit, 64-bit
64 bit processors can run both 64 and 32 bit operating systems. Run uname -p to see whether the running Linux kernel is 64 or 32 bit.
- Show the CPU model name and version.
$ lscpu | grep '^Model name' Model name: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
- Find the CPU maker or manufacturer.
$ sudo dmidecode --type processor | grep --max-count=1 '^Manufacturer' Manufacturer: Intel(R) Corporation
- Determine the number of logical CPU units.
$ lscpu | grep '^CPU(s)' CPU(s): 16
- Check the number of threads per core.
$ lscpu | grep '^Thread(s)' Thread(s) per core: 2
Multiply the number of cores per socket by the number of threads per core to obtain the total number of logical threads available.
- Identify known CPU vulnerabilities reported by the kernel.
$ lscpu | grep --after-context=10 '^Vulnerabilities' Vulnerabilities: Itlb multihit: Not affected L1tf: Not affected Mds: Not affected Meltdown: Not affected Mmio stale data: Not affected Retbleed: Not affected Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Spectre v1: Mitigation; __user pointer sanitization Spectre v2: Not affected Srbds: Not affected Tsx async abort: Not affected ##### snipped #####
Actual vulnerability fields depend on CPU model, microcode, and kernel version; mitigation status is determined by the running system.
- Check the current CPU speed.
$ lscpu | grep '^CPU MHz' CPU MHz: 2304.000
- Retrieve the CPU ID or serial number.
$ sudo dmidecode --type processor | grep --max-count=1 'ID:' ID: ED 06 09 00 FF FC 8B 1F
The CPU ID is unique to each processor package on the system and is often used for identification or licensing checks.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
Comment anonymously. Login not required.
