Back to the command reference

nice

ProcessesAdvanced In real Linux

Run a command with a given priority

Name: nice: being nice to other processes by lowering your priority

This command needs a real Linux system; you can practise it in real Linux mode.

Description

nice starts a command with an adjusted priority. Niceness ranges from -20 (highest priority) to 19 (lowest), default 0. Ordinary users may only lower priority (raise niceness); raising it needs root. Good for unhurried heavy jobs like backups.

Syntax

nice [-n ADJUSTMENT] COMMAND

Common options

-n / --adjustment NNiceness from -20 (highest) to 19 (lowest); default 10

Examples

  • $ nice -n 19 tar -czf backup.tar.gz /home

    Archive at the lowest priority

    Explain

Related