In this tutorial, we will introduce some linux commands for finding how many cpu installed in your linux system. You can use one of them.
Command 1
cat /proc/cpuinfo | grep processor | wc -l
Run this code, we may see: 28
It means there are 28 cpu in your operation.
Command 2
We can use command:
lscpu
Run this command, we will see:
Command 3
We also can use command:
getconf _NPROCESSORS_ONLN
Run it, we also can get 28 in this example.
Moreover, if you plan to know how many GPUs have installed in linux operation, we can read:
Steps to Find Out How Many GPU Installed in Linux – Linux Tutorial