# duf

> Disk usage utility with colorful output, filtering, and JSON export - replacement for df command

Stars: 15.4k · Language: Go · License: MIT · Categories: System

- Repository: https://github.com/muesli/duf
- Page: https://www.trmn.sh/tools/duf

## Install

- Homebrew: `brew install duf`
- APT: `apt install duf`
- Pacman: `pacman -S duf`

## Overview

duf is a disk usage utility that serves as a modern replacement for the traditional `df` command. It displays filesystem usage information with colorful, user-friendly output that automatically adjusts to your terminal's theme and width. The tool works across Linux, BSD, macOS, and Windows systems.

duf provides extensive filtering capabilities to show or hide specific device types (local, network, fuse, special, loops, binds), filesystem types (tmpfs, vfat, etc.), or mount points. It supports wildcard matching for mount point filtering and can sort results by various criteria including size, usage, available space, or filesystem type. Users can customize the display by showing or hiding specific columns like mountpoint, size, used space, available space, and inode information.

The tool includes configurable color-coding thresholds to highlight disk usage levels in red, green, or yellow based on available space or usage percentages. For automation and scripting purposes, duf can export its output in JSON format. It supports both block usage display (default) and inode information display, making it suitable for system administrators and developers who need detailed filesystem monitoring capabilities.

### Installation

```bash
# via Homebrew
brew install duf
```

```bash
# via APT
apt install duf
```

```bash
# via Pacman
pacman -S duf
```

![duf terminal output showing colorful disk usage information](https://media.trmn.sh/cached/86c982bf70acffca177d519236204be2525bf29cb0c6c7b38b1d5eeca6448864.png)

## Alternatives

- [Kopia](https://www.trmn.sh/tools/kopia.md): Cross-platform backup tool that creates encrypted, compressed, deduplicated snapshots and stores them on cloud, network, or local storage. Includes CLI and GUI. (Go, 14.6k stars)
- [ctop](https://www.trmn.sh/tools/ctop.md): Top-like interface for monitoring Docker and runC container metrics in real-time (Go, 17.8k stars)
- [chezmoi](https://www.trmn.sh/tools/chezmoi.md): Dotfile manager that keeps a source state, previews changes with diff, and applies configuration across machines using templates. (Go, 22.1k stars)
- [witr](https://www.trmn.sh/tools/witr.md): Traces a process, port, container, or file back to the chain of supervisors, services, and shells that started it. Offers CLI, JSON output, and a TUI. (Go, 22.9k stars)
- [age](https://www.trmn.sh/tools/age.md): File encryption tool with small explicit keys, post-quantum support, and UNIX-style composability. (Go, 24.2k stars)

## Guides

- [Modern Replacements for df](https://www.trmn.sh/replace/df): duf and dysk compared as replacements for df: platforms, filtering, sorting, and JSON or CSV export for scripts.

---

Canonical: https://www.trmn.sh/tools/duf
