How to Fix bash: iotop: command not found in Minimal Linux

When storage solid-state drives or storage arrays experience severe bottleneck lag, the iotop command-line utility provides top-like real-time monitoring of disk input/output operations per process. System administrators rely on iotop to catch runaway processes causing high I/O wait times. In stripped cloud virtual machines and lightweight Docker base images, executing the command outputs bash: iotop: command not found.

Install iotop via Distribution Package Managers

Installing iotop is supported across all major Linux package distributions.

  1. On Ubuntu, Debian, Linux Mint, and derivatives:
    sudo apt update && sudo apt install -y iotop
    (Alternatively, install the modern C-based rewrite: sudo apt install -y iotop-c)
  2. On CentOS, Rocky Linux, AlmaLinux, RHEL, and Fedora:
    sudo dnf install -y iotop || sudo yum install -y iotop
  3. On Alpine Linux:
    apk update && apk add iotop
  4. On Arch Linux:
    sudo pacman -Sy iotop

Verify Kernel Task Delay Accounting Requirements

iotop reads per-process I/O statistics from the Linux kernel via Task Delay Accounting (CONFIG_TASK_DELAY_ACCT and CONFIG_TASK_IO_ACCOUNTING).

  • Execute iotop with root privileges: sudo iotop.
  • If the utility reports missing kernel accounting, enable task delay accounting at runtime:
    sudo sysctl -w kernel.task_delayacct=1
  • Alternatively, launch iotop in accumulated mode to track total disk writes:
    sudo iotop -a

Monitor I/O Bottlenecks Using Native pidstat and vmstat

If operating inside strict immutable containers where installing iotop is restricted, native sysstat utilities provide similar disk telemetry.

  1. Use pidstat to track per-process disk read/write bandwidth:
    pidstat -d 1
  2. Use vmstat to monitor system-wide blocked processes (b column) and I/O wait (wa column):
    vmstat 1 5

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.