🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

renice Command

Intermediate Process Management man(1)

Alter priority of running processes

👁 11 views 📅 Updated: Mar 15, 2026
SYNTAX
renice [OPTION]... PRIORITY PID...

What Does renice Do?

renice changes the scheduling priority (niceness) of running processes. While nice sets priority at launch time, renice modifies priority of processes that are already running.

renice can target processes by PID, by user (all processes of a user), or by process group. It is commonly used to lower the priority of runaway processes or to prioritize critical tasks without restarting them.

Niceness values range from -20 (highest priority) to 19 (lowest priority). Regular users can only increase niceness (lower priority). Only root can decrease niceness (increase priority).

Options & Flags

OptionDescriptionExample
-n Specify niceness value renice -n 10 -p 1234
-p Target process by PID renice -n 15 -p 1234
-u Target all processes of a user sudo renice -n 10 -u www-data
-g Target process group renice -n 5 -g 1234

Practical Examples

#1 Lower process priority

Sets the process to low priority so it does not hog CPU.
$ renice -n 15 -p 1234
Output: 1234 (process ID) old priority 0, new priority 15

#2 Increase priority (root)

Gives a critical process higher priority.
$ sudo renice -n -5 -p 1234

#3 Renice all user processes

Sets all of backupuser's processes to lowest priority.
$ sudo renice -n 19 -u backupuser

#4 Fix runaway process

Drops the priority of a CPU-hogging process without killing it.
$ renice -n 19 -p $(pgrep -f "heavy_process")

#5 Renice process group

Changes priority for all processes in the process group.
$ renice -n 10 -g 5678

Tips & Best Practices

Quick priority fix: When a process is hogging CPU: renice -n 19 -p PID. This instantly makes it yield to other processes without killing it.
Cannot reverse as non-root: Regular users can increase niceness but cannot decrease it. Once you nice a process to 19, you need root to bring it back.
Use htop instead: htop lets you renice processes interactively: select process, press F7/F8 to change niceness. More convenient than command line.

Frequently Asked Questions

How do I change priority of a running process?
Use renice -n VALUE -p PID. Example: renice -n 10 -p 1234 sets niceness to 10.
Why does renice say "Permission denied"?
Regular users can only increase niceness (lower priority). Decreasing niceness (higher priority) requires root/sudo.
What is the difference between nice and renice?
nice sets priority when launching a new process. renice changes priority of an already running process.

Master Linux with Professional eBooks

Curated IT eBooks covering Linux, DevOps, Cloud, and more

Browse Books →