Sobes.tech
Middle

What states can a process be in Linux?

sobes.tech AI

Answer from AI

In Linux, a process can be in the following main states:

  • R (Running) — the process is executing or ready to execute (waiting for the CPU).
  • S (Sleeping) — the process is sleeping, waiting for an event or resource (usually interruptible sleep).
  • D (Uninterruptible Sleep) — the process is in uninterruptible sleep, usually waiting for I/O.
  • Z (Zombie) — the process has finished, but its parent has not yet read its exit status.
  • T (Stopped) — the process is stopped (for example, by SIGSTOP or a debugger).

There are also less common states, such as:

  • I (Idle) — the process is waiting in the kernel (on some systems).

These states can be seen, for example, using the ps command in the STAT column.