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.
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 buildDebian/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.debRPM‑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.rpmArch Linux (AUR):
# Prepare AUR
sudo pacman -S --needed base-devel
git clone https://aur.archlinux.org/duf.git
cd duf
less PKGBUILD
makepkg -siTermux (Android): pkg install duf macOS (Homebrew or MacPorts):
brew install duf
# or
sudo port selfupdate && sudo port install dufFreeBSD:
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 usedValid 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 lightJSON 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.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Open Source Linux
Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
