Nproc Installation On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

Nproc Installation On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

nproc

Print the number of processing units (normally CPUs) available.

Maintainer: Michael Stone



Section: utils

Install nproc

  • Debian apt-get install coreutils Click to copy
  • Ubuntu apt-get install coreutils Click to copy
  • Alpine OS apk add coreutils Click to copy
  • Arch Linux pacman -S coreutils Click to copy
  • Kali Linux apt-get install coreutils Click to copy
  • CentOS yum install coreutils Click to copy
  • Fedora dnf install coreutils Click to copy
  • Raspbian apt-get install coreutils Click to copy
  • macOS brew install coreutils Click to copy

Print the number of processing units (normally CPUs) available.

How to use nproc?

Below are few example commands for nproc that you can use in the terminal.

Display the number of available processing units:
nprocClick to copy
Display the number of installed processing units, including any inactive ones:
nproc --allClick to copy
If possible, subtract a given number of units from the returned value:
nproc --ignore countClick to copy
Installation of latest nproc command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS. You can copy the command for your OS from above and paste it into your terminal. Once you run the command it will download the 2026 latest package from the repository and install it in your computer/server.