How to Install Duf on Ubuntu 22.04
Introduction
Before we begin talking about how to install Duf on Ubuntu 22.04, let's briefly understand – What is Duf?
Duf, or Disk Usage Free utility, is a powerful command-line tool that provides an overview of the disk space usage on your computer. It helps you identify which files and directories are taking up the most space, allowing you to efficiently manage your storage.
Duf displays information in a simple and intuitive format, making it easy to analyze disk usage and locate any potential space hogs. By utilizing Duf, you can optimize your storage usage and keep your system running smoothly.
In this tutorial, you will install Duf on Ubuntu 22.04. We will also address a few FAQs on how to install Duf on Ubuntu 22.04.
Advantages of Duf
- Efficient disk space management: Duf enables you to identify and analyze large files and directories, optimizing your storage usage.
- User-friendly interface: With its simple and intuitive format, Duf makes it easy to navigate and understand disk usage information.
- Command-line power: Being a command-line tool, Duf offers fast and efficient performance, making it ideal for advanced users.
- Lightweight and portable: Duf is a lightweight utility that doesn't burden your system resources, and it can be run on various platforms.
- Customizable output: Duf allows you to personalize the display and filter options, tailoring the information to suit your needs.
Prerequisites
- An operating system running Ubuntu 22.04.
root
access to the system.
Check for System Updates
Using the following commands, we will first update the system to the most recent version.
apt update
apt upgrade
Install Duf
The most recent version at the time this article was written was 0.8.1
. The most recent version of the .deb
source file is available for download from their official repository.
As seen below, we will use the wget
command to download.
wget https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.deb
Output
root@vps:~# wget https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.deb
--2022-07-11 18:14:42-- https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.deb
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.109.133, 185.199.111.133, 185.199.108.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 917644 (896K) [application/octet-stream]
Saving to: ‘duf_0.8.1_linux_amd64.deb’
duf_0.8.1_linux_amd 100%[===================>] 896.14K --.-KB/s in 0.08s
2022-07-11 18:14:42 (11.3 MB/s) - ‘duf_0.8.1_linux_amd64.deb’ saved [917644/917644]
Use the dpkg
command to install the .deb
source file that was downloaded.
apt install dpkg
dpkg -i duf_0.8.1_linux_amd64.deb
Output
root@vps:~# dpkg -i duf_0.8.1_linux_amd64.deb
Selecting previously unselected package duf.
(Reading database ... 71656 files and directories currently installed.)
Preparing to unpack duf_0.8.1_linux_amd64.deb ...
Unpacking duf (0.8.1) ...
Setting up duf (0.8.1) ...
Using the Duf Command Utility
Now, let's try obtaining disk-related information from the terminal by using the duf
command.
duf
Output
root@vps:~# duf
╭────────────────────────────────────────────────────────────────╮
│ 1 local device │
├────────────┬───────┬──────┬───────┬────────┬──────┬────────────┤
│ MOUNTED ON │ SIZE │ USED │ AVAIL │ USE% │ TYPE │ FILESYSTEM │
├────────────┼───────┼──────┼───────┼────────┼──────┼────────────┤
│ / │ 48.7G │ 2.5G │ 43.7G │ 5.0% │ ext4 │ /dev/vda3 │
╰────────────┴───────┴──────┴───────┴────────┴──────┴────────────╯
╭────────────────────────────────────────────────────────────────────────────╮
│ 7 special devices │
├────────────────┬────────┬────────┬────────┬────────┬──────────┬────────────┤
│ MOUNTED ON │ SIZE │ USED │ AVAIL │ USE% │ TYPE │ FILESYSTEM │
├────────────────┼────────┼────────┼────────┼────────┼──────────┼────────────┤
│ /dev │ 947.7M │ 0B │ 947.7M │ │ devtmpfs │ udev │
│ /dev/shm │ 991.6M │ 0B │ 991.6M │ │ tmpfs │ tmpfs │
│ /run │ 198.3M │ 952.0K │ 197.4M │ 0.5% │ tmpfs │ tmpfs │
│ /run/lock │ 5.0M │ 0B │ 5.0M │ │ tmpfs │ tmpfs │
│ /run/snapd/ns │ 198.3M │ 956.0K │ 197.4M │ 0.5% │ tmpfs │ tmpfs │
│ /run/user/0 │ 198.3M │ 0B │ 198.3M │ │ tmpfs │ tmpfs │
│ /sys/fs/cgroup │ 991.6M │ 0B │ 991.6M │ │ tmpfs │ tmpfs │
╰────────────────┴────────┴────────┴────────┴────────┴──────────┴────────────╯
Next, discover additional duf
applications and options that you can utilize to get going.
duf --help
Use the following command to see details about pseudo, inaccessible, and duplicate file systems:
duf -all
Output
root@vps:~# duf -all
╭────────────────────────────────────────────────────────────────────────────╮
│ 6 local devices │
├───────────────────┬───────┬───────┬───────┬────────┬──────────┬────────────┤
│ MOUNTED ON │ SIZE │ USED │ AVAIL │ USE% │ TYPE │ FILESYSTEM │
├───────────────────┼───────┼───────┼───────┼────────┼──────────┼────────────┤
│ / │ 48.7G │ 2.5G │ 43.7G │ 5.0% │ ext4 │ /dev/vda3 │
│ /snap/core18/2128 │ 55.5M │ 55.5M │ 0B │ 100.0% │ squashfs │ /dev/loop0 │
│ /snap/core20/1518 │ 62.0M │ 62.0M │ 0B │ 100.0% │ squashfs │ /dev/loop4 │
│ /snap/lxd/21029 │ 70.4M │ 70.4M │ 0B │ 100.0% │ squashfs │ /dev/loop1 │
│ /snap/lxd/22753 │ 67.9M │ 67.9M │ 0B │ 100.0% │ squashfs │ /dev/loop5 │
│ /snap/snapd/16292 │ 47.0M │ 47.0M │ 0B │ 100.0% │ squashfs │ /dev/loop3 │
╰───────────────────┴───────┴───────┴───────┴────────┴──────────┴────────────╯
╭──────────────────────────────────────────────────────────────────────────────────╮
│ 35 special devices │
├────────────────────┬────────┬────────┬────────┬────────┬───────────┬─────────────┤
│ MOUNTED ON │ SIZE │ USED │ AVAIL │ USE% │ TYPE │ FILESYSTEM │
├────────────────────┼────────┼────────┼────────┼────────┼───────────┼─────────────┤
│ /dev │ 947.7M │ 0B │ 947.7M │ │ devtmpfs │ udev │
│ /dev/hugepages │ 0B │ 0B │ 0B │ │ hugetlbfs │ hugetlbfs │
│ /dev/mqueue │ 0B │ 0B │ 0B │ │ mqueue │ mqueue │
│ /dev/pts │ 0B │ 0B │ 0B │ │ devpts │ devpts │
│ /dev/shm │ 991.6M │ 0B │ 991.6M │ │ tmpfs │ tmpfs │
│ /proc │ 0B │ 0B │ 0B │ │ proc │ proc │
│ /proc/sys/fs/binfm │ 0B │ 0B │ 0B │ │ binfmt_mi │ binfmt_misc │
│ t_misc │ │ │ │ │ sc │ │
│ /proc/sys/fs/binfm │ 0B │ 0B │ 0B │ │ autofs │ systemd-1 │
│ t_misc │ │ │ │ │ │ │
│ /run │ 198.3M │ 952.0K │ 197.4M │ 0.5% │ tmpfs │ tmpfs │
│ /run/lock │ 5.0M │ 0B │ 5.0M │ │ tmpfs │ tmpfs │
│ /run/snapd/ns │ 198.3M │ 952.0K │ 197.4M │ 0.5% │ tmpfs │ tmpfs │
│ /run/snapd/ns/lxd. │ 0B │ 0B │ 0B │ │ nsfs │ nsfs │
│ mnt │ │ │ │ │ │ │
│ /run/user/0 │ 198.3M │ 0B │ 198.3M │ │ tmpfs │ tmpfs │
│ /sys │ 0B │ 0B │ 0B │ │ sysfs │ sysfs │
│ /sys/fs/bpf │ 0B │ 0B │ 0B │ │ bpf │ none │
│ /sys/fs/cgroup │ 991.6M │ 0B │ 991.6M │ │ tmpfs │ tmpfs │
│ /sys/fs/cgroup/blk │ 0B │ 0B │ 0B │ │ cgroup │ cgroup │
│ io │ │ │ │ │ │ │
│ /sys/fs/cgroup/cpu │ 0B │ 0B │ 0B │ │ cgroup │ cgroup │
│ ,cpuacct │ │ │ │ │ │ │
│ /sys/fs/cgroup/cpu │ 0B │ 0B │ 0B │ │ cgroup │ cgroup │
│ set │ │ │ │ │ │ │
│ /sys/fs/cgroup/dev │ 0B │ 0B │ 0B │ │ cgroup │ cgroup │
│ ices │ │ │ │ │ │ │
│ /sys/fs/cgroup/fre │ 0B │ 0B │ 0B │ │ cgroup │ cgroup │
│ ezer │ │ │ │ │ │ │
│ /sys/fs/cgroup/hug │ 0B │ 0B │ 0B │ │ cgroup │ cgroup │
│ etlb │ │ │ │ │ │ │
│ /sys/fs/cgroup/mem │ 0B │ 0B │ 0B │ │ cgroup │ cgroup │
│ ory │ │ │ │ │ │ │
│ /sys/fs/cgroup/net │ 0B │ 0B │ 0B │ │ cgroup │ cgroup │
│ _cls,net_prio │ │ │ │ │ │ │
│ /sys/fs/cgroup/per │ 0B │ 0B │ 0B │ │ cgroup │ cgroup │
│ f_event │ │ │ │ │ │ │
│ /sys/fs/cgroup/pid │ 0B │ 0B │ 0B │ │ cgroup │ cgroup │
│ s │ │ │ │ │ │ │
│ /sys/fs/cgroup/rdm │ 0B │ 0B │ 0B │ │ cgroup │ cgroup │
│ a │ │ │ │ │ │ │
│ /sys/fs/cgroup/sys │ 0B │ 0B │ 0B │ │ cgroup │ cgroup │
│ temd │ │ │ │ │ │ │
│ /sys/fs/cgroup/uni │ 0B │ 0B │ 0B │ │ cgroup2 │ cgroup2 │
│ fied │ │ │ │ │ │ │
│ /sys/fs/fuse/conne │ 0B │ 0B │ 0B │ │ fusectl │ fusectl │
│ ctions │ │ │ │ │ │ │
│ /sys/fs/pstore │ 0B │ 0B │ 0B │ │ pstore │ pstore │
│ /sys/kernel/config │ 0B │ 0B │ 0B │ │ configfs │ configfs │
│ /sys/kernel/debug │ 0B │ 0B │ 0B │ │ debugfs │ debugfs │
│ /sys/kernel/securi │ 0B │ 0B │ 0B │ │ securityf │ securityfs │
│ ty │ │ │ │ │ s │ │
│ /sys/kernel/tracin │ 0B │ 0B │ 0B │ │ tracefs │ tracefs │
│ g │ │ │ │ │ │ │
╰────────────────────┴────────┴────────┴────────┴────────┴───────────┴─────────────╯
FAQs to Install Duf on Ubuntu 22.04
Can I install Duf from a different source?
Yes, you can download the Duf binary from the official GitHub repository for Ubuntu and manually install it on your system.
Is Duf compatible with other Ubuntu versions?
Yes, Duf is compatible with various Ubuntu versions, including 22.04, 20.04, and 18.04.
Can I install Duf on a different Linux distribution?
Yes, Duf is available for multiple Linux distributions, including Debian, Fedora, and Arch Linux. Refer to the official documentation for installation instructions specific to your distribution.
How do I launch Duf after installation?
Once installed, simply open a terminal and type duf
. This will launch Duf, displaying disk usage information for your system.
Does Duf require root/superuser privileges?
No, Duf does not require root or superuser privileges to run. However, some operations, such as displaying information for system-protected files, may require elevated privileges.
Can I customize the output of Duf?
Yes, Duf allows you to customize the output. You can use flags like --all
, --si
, and --depth
to modify the displayed information.
Does Duf require a graphical user interface?
No, Duf is a command-line tool and doesn't require a graphical user interface. It can be used in a terminal environment.
Conclusion
We hope this tutorial helped you understand how to install Duf on Ubuntu 22.04.
If you have any queries, please leave a comment below, and we’ll be happy to respond to them for sure.