$
Learn Linux handbook
en
XP:0
Quest 65Polite
+180 XP

Process Niceness (nice & renice)

Launch Interactive Terminal for This Quest→No installation required • Runs fully in browser

Concept & Overview

In a busy office, some low-priority tasks (like filing receipts) can wait, while high-priority requests must be handled immediately. Linux manages process priority using niceness values ranging from -20 (highest priority) to 19 (lowest priority).

- The nice command launches a process with a customized priority. E.g. nice -n 10 sleep 5 starts a sleep command with a polite priority of 10.
- The renice command alters the scheduling priority of an already-running process. E.g., sudo renice +5 9999 lowers the priority of process 9999.

Let's adjust priorities. Run a low-priority command using nice -n 10 sleep 5. Then, lower the priority of the running rogue process 9999 by running sudo renice +5 9999.

Command Syntax Reference

Command / SyntaxDescription
nice -n 10 sleep 5Start sleep with a niceness value of 10
sudo renice +5 9999Lower priority of PID 9999

Verification Objectives

These conditions will be automatically verified when you run commands inside the interactive terminal simulator:

  • ○
    Run the "nice" command with -n 10
  • ○
    Run the "renice" command with sudo

Ready to complete Quest 65?

Test your skills live in the browser terminal with an emulated Linux filesystem, real-time command evaluation, and instant step-by-step hints.