Linux Command for Finding the Number of CPU Processors/Cores – Linux Tutorial

By | June 21, 2022

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.

linux cpuinfo

Command 2

We can use command:

lscpu

Run this command, we will see:

linux lscpu command

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

Leave a Reply