Awesome Open Source
Awesome Open Source


Latest Release Build Status Go ReportCard GoDoc

Disk Usage/Free Utility (Linux, BSD, macOS & Windows)



  • [x] User-friendly, colorful output
  • [x] Adjusts to your terminal's theme & width
  • [x] Sort the results according to your needs
  • [x] Groups & filters devices
  • [x] Can conveniently output JSON




  • Arch Linux: pacman -S duf
  • Nix: nix-env -iA nixpkgs.duf
  • Void Linux: xbps-install -S duf
  • Packages in Alpine, Debian & RPM formats


  • FreeBSD: pkg install duf
  • OpenBSD: pkg_add duf


  • with Homebrew: brew install duf
  • with MacPorts: sudo port selfupdate && sudo port install duf



  • Android (via termux): pkg install duf


  • Binaries for Linux, FreeBSD, OpenBSD, macOS, Windows

From source

Make sure you have a working Go environment (Go 1.12 or higher is required). See the install instructions.

Compiling duf is easy, simply run:

git clone
cd duf
go build


You can simply start duf without any command-line arguments:


If you supply arguments, duf will only list specific devices & mount points:

duf /home /some/file

If you want to list everything (including pseudo, duplicate, inaccessible file systems):

duf --all


You can show and hide specific tables:

duf --only local,network,fuse,special,loops,binds
duf --hide local,network,fuse,special,loops,binds

You can also show and hide specific filesystems:

duf --only-fs tmpfs,vfat
duf --hide-fs tmpfs,vfat

...or specific mount points:

duf --only-mp /,/home,/dev
duf --hide-mp /,/home,/dev

Wildcards inside quotes work:

duf --only-mp '/sys/*,/dev/*'

Display options

Sort the output:

duf --sort size

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

Show or hide specific columns:

duf --output mountpoint,size,usage

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

List inode information instead of block usage:

duf --inodes

If duf doesn't detect your terminal's colors correctly, you can set a theme:

duf --theme light

Color-coding & Thresholds

duf highlights the availability & usage columns in red, green, or yellow, depending on how much space is still available. You can set your own thresholds:

duf --avail-threshold="10G,1G"
duf --usage-threshold="0.5,0.9"


If you prefer your output as JSON:

duf --json


Users of oh-my-zsh should be aware that it already defines an alias called duf, which you will have to remove in order to use duf:

unalias duf


Got some feedback or suggestions? Please open an issue or drop me a note!

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Go (198,511
Hacktoberfest (37,988
Linux (17,098
Cli (15,975
Windows (10,127
Macos (9,206
Terminal (4,263
Filesystem (1,934
Tui (682
Freebsd (558
Openbsd (286
Disk Space (82
User Friendly (82
Disk Usage (56
Df (11
Related Projects