LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

nice

runs a command with modified scheduling priority

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 a modified CPU scheduling niceness. Higher niceness means the process is "nicer" and receives less CPU time (lower priority).Niceness ranges from -20 (highest priority) to 19 (lowest priority). With no command, nice prints the current niceness of the shell to standard output. When given a command with no -n, nice applies the default adjustment of +10.

PARAMETERS

COMMAND

Command to run.
-n, --adjustment=N
Add integer N to the niceness (default 10). Negative values raise priority.
--help
Display help information.
--version
Output version 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
Kai