To display the number of CPUs.
cat /proc/cpuinfo | grep processor | wc -l
returns:
24
NOTE: /proc/cpuinfo contains all of the processor information for all current processors in the system.
lscpu | egrep 'CPU\(s\)'
returns:
CPU(s): 24 On-line CPU(s) list: 0-23 NUMA node0 CPU(s): 0-23
nproc
returns:
24