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.

nproc [OPTION]...

Working with nproc Command

1. Use nproc command


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.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :


Please write to us at to report any issue with the above content.