Welcome to the fascinating world of DUF! DUF, which stands for Disk Usage/Free Utility, is a modern, powerful, and user-friendly command-line tool designed to help you effortlessly analyze and manage disk space on your system. Its colorful and interactive interface provides a visually appealing way to monitor disk usage, making it a popular choice among system administrators, developers, and Linux enthusiasts.
Here are some key features that set DUF apart:
- Cross-platform compatibility: DUF is not limited to Linux systems but works seamlessly on macOS, Windows, and FreeBSD.
- Attractive visuals: Unlike traditional CLI tools, DUF’s interface is enhanced with aesthetically pleasing colors and graphs, making it easy to understand disk usage patterns.
- Interactive: DUF’s responsive interface allows you to sort and filter the displayed information in real-time, providing a tailored view of your system’s disk usage.
- Customizable: With DUF, you can easily adjust the appearance and output according to your preferences, making it a versatile tool for various use cases.
- Lightweight: DUF is a lightweight utility that consumes minimal system resources, ensuring your system’s performance remains unaffected while you monitor disk usage.
- Open-source: DUF is open-source software, meaning you can access its source code, contribute to its development, and stay up-to-date with the latest features and improvements.
This guide will demonstrate how to install DUF on Ubuntu 22.04 Jammy Jellyfish or Ubuntu 20.04 Focal Fossa using CLI commands. We will also cover some basic command usage to get you started.
Table of Contents
Section 1: Install Duf on Ubuntu
Step 1: Update Ubuntu
Before installing DUF, you must update your Ubuntu system to ensure that all existing packages are up-to-date. This helps prevent any conflicts or issues during the installation process. To update your system, run the following command:
sudo apt update && sudo apt upgrade
Step 2: Install Duf from Ubuntu Repository
The easiest way to install DUF is by using the Ubuntu default repository. DUF does not have frequent updates, making this method the most convenient option for installation. Run the following command to install DUF on your system:
sudo apt install duf
Section 2: Duf Commands
This section will explore the basic and advanced usage of DUF commands to help you understand and utilize the tool effectively. As your guide, we will explain each step and provide examples to ensure you gain a solid grasp of DUF’s capabilities.
Step 1: Display Disk Usage with Default Settings
To start, let’s use the most straightforward command for DUF, which displays disk usage with the default settings. Type duf
in the terminal and press Enter:
duf
This command will display an overview of your system’s disk usage, including information on filesystem types, mount points, sizes, and usage percentages.
Step 2: Filter Results by Filesystem Type
You can filter the output by filesystem type to focus on specific storage devices or systems. Use the --only-fs
flag followed by the desired filesystem type:
duf --only-fs ext4
This command will display disk usage information for only ext4
filesystems.
Step 3: Customize Output Columns
DUF allows you to customize the displayed columns, providing a tailored view of the disk usage information. Use the --output
flag followed by the desired column names separated by commas:
duf --output size,used,avail,mountpoint
This command will display the output’s size, used space, available space, and mount point columns.
Step 4: Advanced Usage with Multiple Flags
You can combine multiple flags to create more complex and customized queries. For example, to display only ext4
filesystems, sorted by size, and with specific columns:
duf --only-fs ext4 --sort size --output size,used,avail,usage,mountpoint
This command demonstrates the flexibility and power of DUF, allowing you to create customized views that suit your specific needs.
Section 3: Additional Tips and Tricks with DUF
This section will cover additional tips and tricks to help you make the most of DUF, ensuring you can easily monitor and manage your disk space.
Step 1: Display All Filesystems
By default, DUF displays only local filesystems. To display all filesystems, including remote and special ones, use the --all
flag:
duf --all
This command will provide an overview of all filesystems present on your system.
Step 2: Display Inode Usage
DUF can also display inode usage information. Inodes are essential filesystem structures that store metadata about files and directories. To view inode usage, use the --inodes
flag:
duf --inodes
This command will display inode usage information, including the total number of inodes, used inodes, and the inode usage percentage.
Step 3: Display Help and Available Options
To view the help documentation and available options, use the --help
flag:
duf --help
This command will display a list of available flags and options, offering a quick reference for customizing DUF’s output.
Step 4: Show Version Information
To display the installed version of DUF, use the --version
flag:
duf --version
This command will show the DUF version, helping you ensure you use the latest release with all available features and improvements.
Conclusion: Installing Duf on Ubuntu
In this guide, we have walked you through the process of installing and using DUF on Ubuntu Linux. By following these steps, you have successfully set up a powerful and versatile disk usage monitoring tool, enabling you to better understand and manage your system’s disk space. Remember, DUF’s customization options and interactive interface make it a valuable utility for both beginners and experienced users alike. Keep exploring and mastering DUF to enhance your system administration skills further.
Additional Resources and Links
To help you continue your journey with DUF, we have compiled a list of official resources and links that provide more in-depth information and guidance. These sources will assist you in expanding your knowledge of DUF and its capabilities:
- DUF GitHub Repository: The official DUF repository contains the source code, latest releases, and comprehensive documentation. Visit the repository here.
- DUF Release Notes: Stay updated with the latest features, improvements, and bug fixes by reviewing DUF’s release notes, available on the GitHub repository.