Open In App

nproc Command in Linux with Examples

Last Updated : 30 Jun, 2020
Improve
Improve
Like Article
Like
Save
Share
Report

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

nproc-linux
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

To-print-total-installed-processing-units
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

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

4. To display the help section

nproc --help

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

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

6. To display nproc manual

man nproc

nproc-manual
This command will print the manual of the nproc command.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads