I wouldn’t call myself a command line ninja but I do have a soft spot for getting things done using a CLI.

At the end of 2021 I wrote a list of the best command line apps I use on the regular. In that rundown I spotlighted btop, a powerful and engaging alternative to top, and intro’d ncdu, an awesome, interactive replacement for the regular du command, written in Ncurses.

This week I came across a similarly flashy “replacement” for another command that I use from time to time: df.

Df is a command line basic that relays file system disc space usage on a(ll) drive(s). There are ample options you can pass to Df to tailor the output to your needs (something the df man-page will walk you through better than I can):

But it could be better.

Duf is a Neat Df Alternative

Enter Duf (Disk Usage/Free Utility). This command-line tool pitches itself as “a better df alternative” and, for my needs, it is.

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

Don’t get me wrong df is good at what it does, but it’s also very utilitarian. The way duf presents information is more ordered and more intelligible at-a-glance (at least it is to me).

I can’t help but find the output from duf (above) easier to parse than the terse tabulation returned by a vanilla df command. You’d think that by showing me more information off the bat it’d be hardware to find the information I need. And yet… The exact opposite.

What’s especially great is that it is easy to install ‘duf’ on Ubuntu 22.04 LTS:

sudo apt install duf

And to run it:

duf

Remember: duf is as concise or as expansive as you need. Pass it the --all option and it goes from short and sweet to very long and detailed:

Use –all to get ALL the information

Run duf --help to get a full overview of everything it can do, or stop by its Github page to learn more, or download an installer to use on an older version of Ubuntu.

Summary

Will switching to Duf change the way people use their computer? Hah, no. But I do find it to be a nice crutch for the few times I need (and sometimes just want) to look at amount of free space on my mounted file system(s).

Try it out and let me know what you think!

cli duf terminal terminal apps