How to Fix bash dstat command not found in Minimal Linux

The error message “bash: dstat: command not found” surfaces in Linux terminal sessions when system administrators attempt to monitor real-time CPU, memory, disk I/O, and network throughput using the versatile dstat performance monitoring utility. Minimal Linux server templates, cloud virtual machines, and lightweight Docker containers exclude dstat by default to keep disk footprints minimal.

Install dstat on Debian, Ubuntu, and Linux Mint

On Debian-derived distributions, dstat is hosted within the standard universe repositories:

  1. Update your local package index:
    sudo apt update
  2. Install the dstat package:
    sudo apt install -y dstat
  3. Confirm successful installation by checking the utility version:
    which dstat
    dstat --version

Install dstat on RHEL, CentOS, Rocky Linux, and Fedora

Red Hat Enterprise Linux derivatives provide dstat through the standard package management streams:

  1. On Fedora, RHEL 8/9, Rocky Linux, and AlmaLinux:
    sudo dnf install -y dstat
  2. Note: On RHEL 8 and 9, dstat has been replaced by the Python 3 rewrite known as pcp-system-tools (which provides the drop-in pmlogger / dstat compatibility command):
    sudo dnf install -y pcp-system-tools
  3. On legacy CentOS 7 servers:
    sudo yum install -y dstat

Install dstat in Alpine Linux Containers

Alpine Linux container images support dstat via the community package repository:

  1. Update the Alpine package index:
    apk update
  2. Install dstat alongside Python 3 runtime dependencies:
    apk add dstat
  3. In automated Dockerfile build manifests, include the package during container compilation:
    RUN apk add --no-cache dstat

Install dstat on Arch Linux and Manjaro

Arch Linux packages the resource statistics tool in the core community repository:

  1. Synchronise the Pacman package database and install dstat:
    sudo pacman -Sy dstat
  2. Execute a multi-metric real-time resource check:
    dstat -cdngy

Installing the dstat package restores comprehensive real-time system performance monitoring and resource profiling across minimal Linux environments.

Get the best tech tips delivered straight to your inbox.

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