nice -n 10: Launch a Command at Lower CPU Priority
Start a command with a higher niceness so it yields CPU time to your interactive programs.
01Command
$ nice -n 10 ./backup-script.sh02What it does
Niceness scales from -20 (highest priority) to 19 (lowest); the default niceness is inherited from the parent shell (usually 0). nice -n 10 launches the command with niceness 10, so the scheduler gives it CPU only after normal-priority work is served. Without -n, plain nice <command> uses the default adjustment of 10 as well. Negative values (higher priority) require root; ordinary users can only lower priority — and for a process that is already running, use renice instead.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Ubuntu Manpage: nice - invoke a utility with an altered nice valueEvidence: "nice [ -n increment ] utility [argument...]" — the -n option takes an increment that is added to the current niceness; unprivileged users can only raise (positive) niceness.
- nice - run a program with modified scheduling priorityEvidence: "nice - run a program with modified scheduling priority"; "-n, --adjustment=N add integer N to the niceness (default 10)"; niceness ranges typically from -20 (most favorable) to 19.
Last verified: 2026-09-19 · Category: System & Settings
06Related solutions
Refresh the package index from all configured repositories, then install newer versions of every upgradable package.
Find every occurrence of a pattern across all files in a tree, printed as file:line:number matches.
Unpack a gzipped tarball into the current directory while printing each file as it is extracted.