Skip to content

Linux nice Guide

Mattscreative edited this page Dec 5, 2025 · 2 revisions

Linux nice Guide

Complete beginner-friendly guide to nice on Linux, covering Arch Linux, CachyOS, and other distributions including process priority, CPU scheduling, and performance tuning.


Table of Contents

  1. Understanding nice
  2. nice Basics
  3. Setting Priority
  4. Priority Levels
  5. Troubleshooting

Understanding nice

What is nice?

nice sets process priority.

Uses:

  • Set priority: Change process priority
  • CPU scheduling: Control CPU access
  • Performance tuning: Tune process performance
  • Resource management: Manage resources

Why it matters:

  • Performance: Control process priority
  • Resource management: Manage CPU usage
  • System stability: Maintain system stability

nice Basics

Run with Priority

Basic usage:

# Run with nice priority
nice command

# Default nice value: 10

Set Nice Value

Specify value:

# Set nice value
nice -n 15 command

# -n = nice value (higher = lower priority)

Setting Priority

Nice Values

Value range:

# Nice range: -20 to 19
# -20 = highest priority
# 19 = lowest priority

# High priority
nice -n -10 command

# Low priority
nice -n 15 command

Change Existing

Modify priority:

# Change existing process (use renice)
renice 10 -p 1234

# Changes process 1234 to nice 10

Priority Levels

High Priority

Increase priority:

# High priority (requires root)
sudo nice -n -10 command

# Negative values need root

Low Priority

Decrease priority:

# Low priority
nice -n 19 command

# Lowest priority

Troubleshooting

Permission Denied

Use sudo:

# Negative nice values need root
sudo nice -n -10 command

# Or use renice
sudo renice -10 -p PID

Summary

This guide covered nice usage, process priority, and CPU scheduling for Arch Linux, CachyOS, and other distributions.


Next Steps


This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.

Clone this wiki locally