Saturday, August 21, 2021

Finding the number of cores in Ubuntu 20.04

 $ lscpu | egrep 'CPU\(s\)'

CPU(s):                          4

On-line CPU(s) list:             0-3

NUMA node0 CPU(s):               0-3


$ cat /proc/cpuinfo | grep processor | wc -l

4


$ nproc

4