NPROC(1)
πΈ NPROC β okay bestie, let's count your CPUs π
No seriously, that's the whole manual name: nproc, and it prints the number of processing units available. It's the nproc(1) page from the User Commands section. That's it. That's the girl. π
β¨ SYNOPSIS β¨
nproc [OPTION]...
Just nproc and then whatever options you feel like. She's flexible like that. π¦
π DESCRIPTION π
Okay so here's the tea β: nproc prints the number of processing units available to the current process. Not the whole machine β to your process. Which means, lowkey, that number may be less than the number of online processors. It's giving "you don't get the whole cake, you get your slice." π°
And here's the plot twist that gets people every time: if the OMP_NUM_THREADS or OMP_THREAD_LIMIT environment variables are set, they will determine the minimum and maximum returned value respectively. So OMP_NUM_THREADS sets your floor, OMP_THREAD_LIMIT sets your ceiling. The env vars are literally the parents here, and they're setting a curfew. π
Now the options, bestie, one by one, no skipping: β¨
--allβ prints the number of installed processors, and it does it while disregarding any OpenMP environment variables, or CPU quotas. She said "I don't know her" to the limits. π₯--ignore=Nβ if possible, excludes N processing units. And the result is guaranteed to be at least 1, so she'll never hand you a zero, she's not gonna do you like that. π«Ά--helpβ displays this help and exits. Classic. π--versionβ outputs version information and exits. Also classic. β¨
π AUTHOR π
Written by Giuseppe Scrivano. We stan. π
π REPORTING BUGS π
Found a bug? Don't be shy, tell the coreutils girlies:
- Report bugs to:
bug-coreutils@gnu.org - GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
- General help using GNU software: <https://www.gnu.org/gethelp/>
- Report any translation bugs to <https://translationproject.org/team/>
π SEE ALSO π
- Full documentation <https://www.gnu.org/software/coreutils/nproc> β or available locally via:
info '(coreutils) nproc invocation'
And for the legal-lore girlies, because we keep every single receipt: π§Ύ
- Packaged by Ubuntu (
9.10-1ubuntu2) - Copyright Β© 2026 Free Software Foundation, Inc.
- License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
- This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Not a vibe, but like, legally important. π
GNU coreutils 9.10, August 2026, and this whole page is NPROC(1) β mwah, that's the wrap, go count some CPUs bestie, ily, bye! πβ¨π¦π
π¦ where this page comes from
- ubuntu stonking: gnu-coreutils 9.10-1ubuntu2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms