Duf disk utility, an open-source, free “Disk Usage Free Utility” written in Goland and released under an MIT license. The disk utility supports multi-platforms such as BSD, Linux, macOS, and Windows operating systems. The command-line utility finds disk usage in Linux and Unix-like systems terminals. One of the excellent features of Duf is its ability to display disk usage details in a beautiful, user-friendly layout in tab form. Some extra features with Duf include disk usage out in JSON output.
In the following tutorial, you will learn how to install Duf Ubuntu 22.04 LTS Jammy Jellyfish by downloading the package directly from the project’s GitHub and installing it using the command line terminal. The tutorial will also focus on some common-use commands.
Table of Contents
First, before you begin by updating your system, ensure all existing packages are up to date to avoid any conflicts during the installation.
sudo apt update && sudo apt upgrade
Install Duf Disk Usage Utility
Duf disk utility does not come in Ubuntu 22.04’s default repository, so you must download the .deb package from the project’s GitHub releases page. Once you get the latest link, open your terminal and download the package.
PLEASE DO NOT JUST COPY THIS COMMAND. CHECK THE GITHUB PAGE FOR A NEW VERSION OR LINK AND REPLACE IT ACCORDINGLY.
Next, install Duf Disk Usage Utility with the following command.
sudo dpkg -i duf_*.*.*_linux_*
The above command should work for any version you download for architecture and version. If this fails, you must replace the stars with the version numbers.
Duf Disk Usage Utility Commands Basics & Examples
Now that you have installed Duf Disk Utility, you can launch the application. To access the display, use the following command in your terminal:
Alternatively, if you would like to display all system files, including those that are duplicates, pseudo, and hidden, use the following command:
Duf can also have the ability to scale down and sort out specifics of what you would like to see and or check on with keywords. The example format syntax would be:
Using keywords would be mount point, size, and usage options. You can use all three together or individually, and any combination is possible.
Example of the mount point, size, and usage:
duf --output mountpoint,size,usage
For customization, you can change the color from light to dark and vice versa.
Activate light theme:
duf --theme light
Activate dark theme:
duf --theme dark
To access the help menu to find out more information about a command or find more information in general, use the following command.
Usage of duf: -all include pseudo, duplicate, inaccessible file systems -avail-threshold string specifies the coloring threshold (yellow, red) of the avail column, must be integer with optional SI prefixes (default "10G,1G") -hide string hide specific devices, separated with commas: local, network, fuse, special, loops, binds -hide-fs string hide specific filesystems, separated with commas -hide-mp string hide specific mount points, separated with commas (supports wildcards) -inodes list inode information instead of block usage -json output all devices in JSON format -only string show only specific devices, separated with commas: local, network, fuse, special, loops, binds -only-fs string only specific filesystems, separated with commas -only-mp string only specific mount points, separated with commas (supports wildcards) -output string output fields: mountpoint, size, used, avail, usage, inodes, inodes_used, inodes_avail, inodes_usage, type, filesystem -sort string sort output by: mountpoint, size, used, avail, usage, inodes, inodes_used, inodes_avail, inodes_usage, type, filesystem (default "mountpoint") -style string style: unicode, ascii (default "unicode") -theme string color themes: dark, light, ansi (default "dark") -usage-threshold string specifies the coloring threshold (yellow, red) of the usage bars as a floating point number from 0 to 1 (default "0.5,0.9") -version display version -warnings output all warnings to STDERR -width uint max output width
Comments and Conclusion
Duf is a simple program to monitor disk utility. It’s lightweight and is under constant development by reviewing its GitHub commits. Bugs are quickly sorted and are a favorite among many who want a light program to see disk usage, especially on server environments.