Linux

How to install duf on Ubuntu 20.04

How to Install duf on Ubuntu 20.04

If you’re looking for a modern command-line tool to display disk usage in a user-friendly format, duf (Disk Usage/Free Utility) is an excellent choice. This guide will walk you through the steps to install duf on Ubuntu 20.04, enabling you to monitor your disk space effectively.

Step 1: Update Your Package List

Before installing any software, it’s important to ensure your package list is up to date. Open your terminal and run the following command

sudo apt update

This command refreshes the list of available packages and their versions, ensuring you install the latest available software.

Step 2: Install Prerequisites

duf may not be available in the default Ubuntu repositories for 20.04. To install it, you’ll first need to install some essential build tools. Run the following command:

sudo apt install build-essential git

These packages will help you compile duf from source if necessary.

Step 3: Download and Install duf

Next, you can download the latest release of duf from its GitHub repository. Use the following commands to fetch and install duf:

git clone https://github.com/muesli/duf.git

cd duf

make build
This process will compile duf from source. After the compilation is complete, you can install it by moving the binary to a directory in your PATH:

sudo mv duf /usr/local/bin/

Step 4: Verify the Installation

To ensure that duf is installed correctly, you can check its version by running:

duf –version

If the installation was successful, you should see the version number of duf displayed in the terminal.

Step 5: Using duf

Using duf is simple. Just type duf in your terminal, and it will provide you with a clear overview of your disk usage, including information about mounted filesystems, available space, and usage percentages. You can run

duf

This command will show you a colorful and organized representation of your disk usage, making it easy to identify which filesystems are using the most space.

Conclusion

Installing duf on Ubuntu 20.04 is a straightforward process that enhances your ability to monitor disk usage with a modern interface. By following these steps, you can effectively keep track of your disk space and ensure your system runs smoothly.

Whether you’re a casual user or an experienced system administrator, duf is a valuable tool for managing disk usage efficiently. Regularly checking your disk space with duf can help you prevent potential storage issues and maintain optimal system performance.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button