Linux Process States

At any moment, every process is in one of a handful of states. Reading these states from ps or top is one of the first things you do when diagnosing a problem.

The Process States

CodeNameMeaning
RRunning/RunnableOn CPU, or ready and waiting for CPU time
SInterruptible SleepWaiting for event (I/O, timer). Can be woken by signals.
DUninterruptible SleepWaiting for I/O. Cannot be killed — not even SIGKILL.
ZZombieFinished, parent hasn't called wait() yet.
TStoppedPaused by SIGSTOP or Ctrl+Z. Resumes with SIGCONT.
IIdle kernel threadSimilar to D but for kernel threads, truly idle

S vs D — The Critical Difference

Both S and D are "sleeping" — but they're very different:

Why can't you kill a process in D state? D (uninterruptible sleep) means the process is in the middle of a critical kernel operation — usually waiting for disk or network I/O at the kernel level. Killing it mid-operation could corrupt data. The kernel ignores SIGKILL in this state. The process will wake up when the I/O completes (or the kernel detects a hang).

Common causes of D state: slow NFS mount, failing disk, kernel bug. If many processes are stuck in D, look for disk issues first:

dmesg | grep -i error iostat -x 1 iotop

Zombie Processes

What is a zombie process and why does it exist? When a process exits, it can't fully disappear yet. The parent might need its exit status (return code). So the kernel keeps a minimal "tombstone" — the process table entry with the exit status. This is the zombie state. Once the parent calls wait(), the zombie is cleaned up.

A few zombies are normal. Thousands of zombies means a parent process is leaking — it's forking children but never calling wait().

# Find zombie processes ps aux | grep Z # Find zombie's parent (to fix the real problem) ps -o ppid= -p ZOMBIE_PID # Then investigate or restart that parent process

State Modifiers in ps Output

ModifierMeaning
sSession leader (controls a terminal)
+In the foreground process group
lMulti-threaded
NLow priority (nice > 0)
<High priority (nice < 0)

Frequently Asked Questions

What will I learn here?

This page covers the core concepts and techniques you need to understand the topic and progress confidently to the next lesson.

How should I use this page?

Start with the overview, then follow the section links to deepen your understanding. Use the table of contents on the right to jump to specific sections.

What should I read next?

Use the navigation below to continue to the next lesson or explore related topics.