Raspberry Pi

How to Get Disk Information on Raspberry Pi Using the duf Utility

A duf is a lightweight command-line utility that allows Raspberry Pi users to find out the disk usage information of their devices. It’s a great alternative to the Raspberry Pi terminal’s most commonly used df command. However, duf is a far better option than df because it makes the information easier to read by separating the information based on the device type.

In this article, we will show you how you can easily install the duf command utility on your Raspberry Pi device.

Install duf on Raspberry Pi

You cannot install duf directly on your Raspberry Pi device because its repository isn’t included in the official Raspberry Pi repository list. However, you can easily install the application through the .deb package and the steps are provided below.

Step 1: Download duf Deb Package

First, you will need to download the duf deb package using the following command:

$ curl -sS https://gist.githubusercontent.com/arbal/408cfa432082e16b9975dee0e0b3bda2/raw/install-duf-latest-deb.sh | bash

Step 2: Install duf Deb Package on Raspberry Pi

With the .deb package downloaded on your Raspberry Pi device; you can now run the following command to install the duf utility:

$ sudo apt install -y ./duf-latest.deb

Step 4: Check the duf version on Raspberry Pi

After installing duf on your Raspberry Pi device, ensure that its latest version is installed on your device by using the following command:

$ duf -version

Step 5: Running duf on Raspberry Pi

To run duf on your Raspberry Pi, you can use execute the below-mentioned command:

$ duf

Removing duf from Raspberry Pi

To completely remove duf from Raspberry Pi, you can execute the following command:

$ sudo apt purge --autoremove duf -y

Conclusion

The duf is an excellent command-line application that runs on your Raspberry Pi terminal and provides you with disk information on your device. You can install duf on your device by first installing its .deb package and then using the apt command installer to successfully download the it. Afterward, you can easily find out the disk information by running the “duf” command on the terminal.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.