explaingit

muesli/duf

15,041Go

TLDR

duf is a command-line tool that shows how much space is used and how much is free on each disk and mounted drive attached to your computer.

Mindmap

A visual breakdown will appear here once this repo is fully enriched.

In plain English

duf is a command-line tool that shows how much space is used and how much is free on each disk and mounted drive attached to your computer. It is presented as a friendlier replacement for the older Unix tool df. Where df prints a dense table of numbers and cryptic device names, duf draws a coloured table that fits the width of the terminal, groups similar devices together, and uses red, green, or yellow to show at a glance which volumes are getting full. The project is written in Go and runs on Linux, the BSDs, macOS, and Windows. The README points to ready-made packages in most of the common package managers: pacman on Arch, apt on Ubuntu and Debian, dnf on Fedora, Nix, Homebrew and MacPorts on macOS, Chocolatey and scoop on Windows, pkg on FreeBSD, and even pkg inside Termux on Android. Pre-built binaries are also published on the releases page, and the source can be compiled with go build after cloning the repo, as long as Go 1.23 or newer is installed. Run with no arguments, duf lists every mount it can see. Arguments narrow the view. You can pass paths to focus on specific mount points, use --all to include the pseudo and duplicate file systems that are usually hidden, or use --only and --hide to keep or remove whole groups such as local, network, fuse, special, loops, and binds. There are matching --only-fs, --hide-fs, --only-mp, and --hide-mp flags to filter by filesystem type or mount path, and quoted wildcards like /sys/* are accepted. The display itself is configurable. The --sort flag orders the table by any column (size, used, available, usage percent, inode counts, type, filesystem, or mount point), and --output picks which columns appear. A --inodes mode swaps block usage for inode usage, useful when a disk is full of small files. The colour cut-offs that decide when a volume turns yellow or red can be tuned with --avail-threshold and --usage-threshold. A --theme flag helps when the terminal background is misdetected. For scripting, duf can print the same information as JSON with the --json flag. One troubleshooting note in the README: users of oh-my-zsh need to run unalias duf first, because that shell config already defines a duf alias.

Open on GitHub → Explain another repo

Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.