System administrators needing to quickly identify disk space hogs on Linux servers frequently rely on gdu (Go Disk Usage), which analyzes directory trees significantly faster than traditional ncdu or du commands. On freshly provisioned cloud VPS droplets or minimal container distributions, typing the command yields bash: gdu: command not found.
Install gdu via Distribution Package Repositories
Install gdu directly using the distribution’s built-in package management:
- Ubuntu (22.04+) / Debian (12+):
sudo apt update && sudo apt install -y gdu - Arch Linux:
sudo pacman -S gdu - Alpine Linux:
sudo apk add gdu - Fedora:
sudo dnf install gdu
Download Official Standalone Release Binary
If running an older Debian release or a minimal enterprise image lacking native packaging:
curl -sL "https://github.com/dundee/gdu/releases/latest/download/gdu_linux_amd64.tgz" | tar -xz
sudo mv gdu_linux_amd64 /usr/local/bin/gdu
sudo chmod +x /usr/local/bin/gdu
Install via Homebrew or Snap
On systems configured with modern alternative package managers:
- Homebrew:
brew install gdu - Snap:
sudo snap install gdu-disk-usage-analyzer && sudo snap connect gdu-disk-usage-analyzer:mount-observe
Test the installation by executing gdu / to launch the interactive ncurses storage breakdown.