LinuxCommandLibrary

nice

TLDR

Run with lower priority

$ nice [command]
copy
Run with specific niceness
$ nice -n [10] [command]
copy
Run with highest priority (root)
$ nice -n [-20] [command]
copy
Run with lowest priority
$ nice -n [19] [command]
copy
Show current niceness
$ nice
copy

SYNOPSIS

nice [options] [command]

DESCRIPTION

nice runs a command with modified scheduling priority. Higher values mean lower priority.
The tool adjusts process niceness. Values range from -20 (highest) to 19 (lowest).
nice sets process priority.

PARAMETERS

COMMAND

Command to run.
-n NICENESS
Adjustment value (-20 to 19).
--help
Display help information.

CAVEATS

Negative values require root. Default adjustment is 10. Affects CPU scheduling only.

HISTORY

nice is a classic Unix command for controlling process scheduling priority since early Unix.

SEE ALSO

renice(1), ionice(1), chrt(1)

Copied to clipboard