![]() To view it, just type the following command into your terminal: cat /proc/cpuinfo This file also contains CPU vendor_id, model name etc. It will list a lot of information about the cpu, including the number of CPU cores on your system. ![]() Open the terminal and run this command: cat /proc/cpuinfo. $ lscpu | grep -E '^Thread|^Core|^Socket|^CPU\('Ĭheck CPU cores from /proc/cpuinfo File in LinuxĪnother way to check the number of cpu cores in Linux is by looking at the /proc/cpuinfo file. In the following examples, the number of CPU cores is 1 * 2=2 $ lscpuįrom this example, we can get that the number of CPU cores are 2 * 8 =16 It supports Intel x86, AMD Family 16h/18h, and ARM processors. The lscpu command displays either one single CPU family or all families detected by querying sysfs (on Linux kernels with CONFIG_SYSFS). It gives you a lot of information about cpu, including the number of cores, the vendor_id, model name etc.Įcho "Cores = $(( $(lscpu | awk '/^Socket\(s\)/') ))" Open the terminal and run this command lscpu. The best way to check the number of CPU cores in Linux is using the lscpu command.
0 Comments
Leave a Reply. |