Installing Duf
Outcome: a duf program that runs
on your machine and can state its
version. Duf is a single
self-contained binary — no installer,
no dependencies, no configuration
file — so "installing" means fetching
the right archive, checking it is
genuine, and putting the binary
somewhere you can run it.
The release download
The lab installed duf 0.9.1 from
the project's GitHub releases
(github.com/muesli/duf). There is
one archive per platform and package
format: plain .tar.gz archives
(including duf_0.9.1_linux_x86_64.tar.gz
for ordinary 64-bit Linux PCs, and
ARM builds for smaller machines) plus
.deb, .rpm and .apk packages of
the same version. The archive the lab
used contains exactly two files:
duf the program (about 3.1 MB)
duf.1 its manual page
The project publishes a
checksums.txt beside the archives,
and the lab verified the download
against it before unpacking
(transcript t00):
grep linux_x86_64.tar.gz checksums.txt | sha256sum -c -
duf_0.9.1_linux_x86_64.tar.gz: OK
That one line is worth the habit: it proves the file on your disk is the file the project published, bit for bit. Unpack, and there is nothing further to install — the binary carries everything it needs, and deleting it removes duf completely.
The check
./duf --version
duf 0.9.1 (b2f01a1ecbfd1af63015b83296c50a95260f97b1) (built on 2025-09-08)
That is the whole acceptance test for
this chapter. --help lists every
option; the ones this guide uses are:
-all include pseudo, duplicate, inaccessible file systems
-avail-threshold coloring threshold of the avail column (default "10G,1G")
-hide / -only hide or show only device groups:
local, network, fuse, special, loops, binds
-hide-fs / -only-fs hide or show only these filesystem types
-hide-mp / -only-mp hide or show only these mount points (wildcards allowed)
-inodes list inode information instead of block usage
-json output all devices in JSON format
-output choose fields: mountpoint, size, used, avail, usage,
inodes, inodes_used, inodes_avail, inodes_usage,
type, filesystem
-sort sort by any of the same fields (default "mountpoint")
-style unicode or ascii (default "unicode")
-theme color themes: dark, light, ansi (default "dark")
-usage-threshold coloring threshold of the usage bars (default "0.5,0.9")
-warnings output all warnings to STDERR
-width max output width
Note the flags are Go-style: one
dash or two both work (-json and
--json are the same flag), and an
unknown flag costs you the full usage
text and exit code 2 — chapter 14 has
the lab's copy of that page.
The other ways in
Duf is also packaged by many Linux
distributions and by Homebrew, and
the .deb, .rpm and .apk files
on the release page install the same
binary through your package manager.
The lab verified the release tarball
only; the packages are documented
here, not tested, and this guide's
commands are the binary's. Everything
after this chapter assumes ./duf
run from where you unpacked it —
in practice you would copy the binary
onto your PATH (for example into
~/bin or /usr/local/bin) and type
plain duf thereafter.