Open In App

nproc Command in Linux with Examples

nproc is a simple Unix command which is used to print the number of processing units available in the system or to the current process. This command could be used in system diagnostics and related purposes. It is part of GNU Core utils, so it comes pre-installed with all modern Linux operating systems.
Syntax:

nproc [OPTION]...

Working with nproc Command

1. Use nproc command



nproc


It prints the number of processing units available to the current process. It may be less than the number of online processors.

2. To print total installed processing units



nproc --all


We use the “–all” option when we want nproc to display the total installed processing units.

3. To exclude some processing units

nproc --ignore=4


We use “–ignore” option when we want nproc to exclude a set number of processing units.

4. To display the help section

nproc --help


This command will display the help section of the nproc command which will have all the information related to the nproc command.

5. To display version

nproc --version


This command will display the version of nproc command in Linux.

6. To display nproc manual

man nproc


This command will print the manual of the nproc command.

Article Tags :