Operations 6 min read

Master Disk Space Monitoring with duf: Install and Use Across Platforms

The article introduces duf, a Go‑based disk usage and free space viewer for Unix‑like systems, explains its features such as colored, resizable output, sorting and JSON mode, and provides step‑by‑step installation instructions for Debian/Ubuntu, RPM‑based distros, Arch AUR, Termux, macOS, FreeBSD, and Windows, plus usage examples and customization options.

Open Source Linux
Open Source Linux
Open Source Linux
Master Disk Space Monitoring with duf: Install and Use Across Platforms

duf (Disk Usage/Free) is a Go‑written command‑line utility that displays available disk space statistics on Linux, macOS, BSD, Android, and Windows.

Key features :

Easy to use

Colorful display

Responsive layout that adapts to terminal size

Sortable output

Filters and grouping

JSON output support

Installation

From source (requires Go):

git clone https://github.com/muesli/duf.git
cd duf
go build

Debian/Ubuntu (pre‑built .deb):

wget https://github.com/muesli/duf/releases/download/v0.5.0/checksums.txt
wget https://github.com/muesli/duf/releases/download/v0.5.0/duf_0.5.0_linux_amd64.deb
sha256sum --ignore-missing -c checksums.txt
sudo dpkg -i duf_0.5.0_linux_amd64.deb

RPM‑based distributions:

wget https://github.com/muesli/duf/releases/download/v0.5.0/duf_0.5.0_linux_amd64.rpm
wget https://github.com/muesli/duf/releases/download/v0.5.0/checksums.txt
sha256sum --ignore-missing -c checksums.txt
rpm -ivh duf_0.5.0_linux_amd64.rpm

Arch Linux (AUR):

# Prepare AUR
sudo pacman -S --needed base-devel
git clone https://aur.archlinux.org/duf.git
cd duf
less PKGBUILD
makepkg -si

Termux (Android): pkg install duf macOS (Homebrew or MacPorts):

brew install duf
# or
sudo port selfupdate && sudo port install duf

FreeBSD:

sudo sh -c 'pkg update && pkg upgrade && pkg install duf'

Windows (Scoop): scoop install duf Basic usage duf Displays a table with total mounted devices, mount points, total size, used and free space, usage percentage, filesystem type, and name.

Show a specific mount point: duf /home Show all filesystems, including pseudo and inaccessible ones: duf --all Sorting output

duf --sort size
duf --sort used

Valid sort keys: mountpoint, size, used, avail, usage, inodes, inodes_used, inodes_avail, inodes_usage, type, filesystem.

Custom columns duf --output mountpoint,size,usage Show inode details instead of block usage: duf --inodes Themes

duf --theme dark
duf --theme light

JSON output duf --json Overall, duf is a lightweight, user‑friendly CLI tool suitable for personal Linux desktops, macOS machines, or development servers, though it may not be ideal for production servers.

duf installation screenshot
duf installation screenshot
duf output example
duf output example
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxWindowsmacOSsystem-monitoringdisk usagecommand-lineduf
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.