Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
D

duf

> 开发工具
Open source

Disk Usage/Free Utility - a better 'df' alternative

15.2K stars0 likes3 views
WebsiteGitHub

About

Disk Usage/Free Utility - a better 'df' alternative

duf

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

Features

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

Installation

Packages

Linux

  • Arch Linux: pacman -S duf
  • Ubuntu (22.04 and later) / Debian (12 and later): apt install duf
  • Fedora Linux: dnf install duf
  • Nix: nix-env -iA nixpkgs.duf
  • Void Linux: xbps-install -S duf
  • Gentoo Linux: emerge sys-fs/duf
  • Solus: eopkg it duf
  • Packages in Alpine, Debian & RPM formats

BSD

  • FreeBSD: pkg install duf
  • OpenBSD: pkg_add duf

macOS

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

Windows

  • with Chocolatey: choco install duf
  • with scoop: scoop install duf

Android

  • Android (via termux): pkg install duf

Binaries

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

From source

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

Compiling duf is easy, simply run:

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

Usage

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

duf

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

Filtering

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"

Bonus

If you prefer your output as JSON:

duf --json

Troubleshooting

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

Feedback

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

  • Twitter
  • The Fediverse

Issues· 84 open

View all issuesOpen on GitHub
  • #382

    Windows: verbatim paths (\\?\...) silently return empty output

    Updated Sep 29, 2026
  • #252

    Feature request: Option to omit the graph in USE%

    Updated Sep 28, 2026
  • #88

    package now available for QNAP NAS

    Updated Aug 21, 2026
  • #361

    The output of the new DUF version is not aesthetically pleasing

    Updated Jul 8, 2026
  • #98

    Group btrfs subvolume mounts

    Updated May 16, 2026
  • #364

    `^[[;;m` as well as `^[[0m` are printed when NO_COLOR is set AND with piped → `cat` output

    Updated Apr 26, 2026
  • #365

    is used persent calculation wrong?

    Updated Apr 18, 2026
  • #362

    recognize duplicate filesystem entries

    Updated Mar 5, 2026
  • #358

    [feature][ZFS] Snapshots ought to be ignored (or hidable)

    Updated Feb 12, 2026
  • #334

    Adding a new style to --style

    Updated Dec 22, 2025

> Tags

Goclidfdisk-spacedisk-usage

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具