How to Get CPU Information with lscpu Command in Linux
To get information about your CPU, run the lscpu command. A lot of information about processor will appear on the screen.
lscpu
The following screenshot is the result of running lscpu command on my 64-bit Linux Laptop.
The lscpu command in Linux provides useful information about the CPUs available in your computer. It shows the processor Architecture, Model name, speed of the CPU, Virtualization type and most importantly, the number of Core available.
Architecture
The Architecture line confirms this is a 64bit processor (x86_64). On a 32 bit system, you will see Architecture type as i686.
Socket(s)
Number of physical CPUs available in your computer. From the above example, we can determine that this Linux computer has only 1 processor available.
Core(s) per socket
Number of cores in a physical CPU. Output suggest this is an AMD dual-core processor.
CPU(s)
This line details total number of cores available on your computer. A socket or physical CPU can consist of a single core or multiple cores.
In Linux each core considers as one CPU. For example, if the server has 2 processors, each with four cores, that means the Linux operating system will always see the number of CPUs as 8 CPUs.