Command to display the number of processors

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

 

/proc/cpuinfo contains all of the processor information for all current processors in the system. This will include the speed, and the amount of on-chip cache, processor architecture type, and the number of cores.