.\"- .\" Copyright (c) 2023 Piotr Paweł Stefaniak .\" .\" SPDX-License-Identifier: BSD-2-Clause .\" Redistribution and use in source and binary forms, with .\" or without modification, are permitted provided that the .\" following conditions are met: .\" .\" 1. Redistributions of source code must retain the above .\" copyright notice, this list of conditions and the .\" following disclaimer. .\" 2. Redistributions in binary form must reproduce the .\" above copyright notice, this list of conditions and .\" the following disclaimer in the documentation and/or .\" other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND .\" CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED .\" WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A .\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE .\" COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, .\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF .\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER .\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING .\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE .\" USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY .\" OF SUCH DAMAGE. .\" .Dd April 2026 .Dt NPROC 1 .Os .Sh NAME .Nm nproc .Nd print the number of processors .Sh SYNOPSIS .Nm .Op Fl a .Op Fl i Ar # .Sh DESCRIPTION The .Nm utility is used to print the number of processors available to the current process, unless the .Fl a flag is specified. .Pp The available flags are: .Bl -tag -width ".Fl i Ar #" .It Fl a Count all processors available on the system. .It Fl i Ar # The result is decreased by .Ar # , but never below 1. .El .Sh COMPATIBILITY This program is .Sy NOT compatible with nproc as found in GNU coreutils. .Sh SEE ALSO .Xr cpuset 1 .Sh AUTHORS .An -nosplit .An Mateusz Guzik Aq Mt mjg@FreeBSD.org wrote the original program for FreeBSD and .An Piotr Paweł Stefaniak Aq Mt pstef@FreeBSD.org wrote the original of this page.