How to get the number of processors and cores through the terminal?

3

How to check the number of processors (CPUs) and cores by the Linux terminal?

    
asked by anonymous 09.06.2015 / 17:37

2 answers

4

To print the number of processing units, use the program nproc .

For more details, use the lscpu program, which displays information such as architecture, number of CPUs, number of sockets, threads per core, cores per socket etc.

    
09.06.2015 / 17:37
3

Another way to get this information is to extract it from /proc/cpuinfo .

~$ grep -c processor /proc/cpuinfo
    
09.06.2015 / 17:56