Installing Duf on Debian 12

Hello,

In this week’s feature highlight, we look at How to Install Duf on Debian 12

Duf also called “Disk Usage Free utility” is a free and open-source tool written in Golang. It is used to display disk usage of the system in a tabular format. It is an alternative to the df command and it can be installed on Linux, BSD, Windows, and macOS. It also displays the disk usage details in the JSON output.

In this post, we will show you how to monitor disk usage with the Duf utility on Debian 12.

Prerequisites:

  • A system with Debian 12 installed and running.
  • root access to the system.

Check for System Updates

First, we will update the system to the latest with the following commands,

apt update
apt upgrade

Install Duf

At the time of writing this article, version 0.8.1 was the latest. You can check and download the latest version of .deb source file from their official repository.

We will download using wget command as shown below,

wget https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.deb

Output:

Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.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_amd64.deb         100%[=============================================================>] 896.14K  --.-KB/s    in 0.02s   

2023-06-15 22:28:46 (51.3 MB/s) - ‘duf_0.8.1_linux_amd64.deb’ saved [917644/917644]

root@vps:~# 

Install the downloaded .deb source file using the dpkg command,

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 ... 33235 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) ...
root@vps:~#

Using the Duf Command Utility

We will now try using the duf command on the terminal to get disk-related information.

duf

Output:

root@vps:~# duf
╭───────────────────────────────────────────────────────────────────────────────────────╮
│ 1 local device                                                                        │
├────────────┬───────┬──────┬───────┬───────────────────────────────┬──────┬────────────┤
│ MOUNTED ON │  SIZE │ USED │ AVAIL │              USE%             │ TYPE │ FILESYSTEM │
├────────────┼───────┼──────┼───────┼───────────────────────────────┼──────┼────────────┤
│ /          │ 97.9G │ 1.7G │ 91.2G │ [....................]   1.8% │ ext4 │ /dev/vda2  │
╰────────────┴───────┴──────┴───────┴───────────────────────────────┴──────┴────────────╯
╭────────────────────────────────────────────────────────────────────────────────────────────────╮
│ 5 special devices                                                                              │
├─────────────┬────────┬────────┬────────┬───────────────────────────────┬──────────┬────────────┤
│ MOUNTED ON  │   SIZE │   USED │  AVAIL │              USE%             │ TYPE     │ FILESYSTEM │
├─────────────┼────────┼────────┼────────┼───────────────────────────────┼──────────┼────────────┤
│ /dev        │   1.9G │     0B │   1.9G │                               │ devtmpfs │ udev       │
│ /dev/shm    │   1.9G │     0B │   1.9G │                               │ tmpfs    │ tmpfs      │
│ /run        │ 391.5M │ 512.0K │ 391.0M │ [....................]   0.1% │ tmpfs    │ tmpfs      │
│ /run/lock   │   5.0M │     0B │   5.0M │                               │ tmpfs    │ tmpfs      │
│ /run/user/0 │ 391.5M │     0B │ 391.5M │                               │ tmpfs    │ tmpfs      │
╰─────────────┴────────┴────────┴────────┴───────────────────────────────┴──────────┴────────────╯

Next, Find out more duf usages and available options that you can use to get started,

duf --help

To display the information about Pseudo, inaccessible, and duplicate file systems, run the following command:

duf -all

Output:

root@vps:~# duf -all
╭────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ 5 local devices                                                                                        │
├────────────────────────────┬───────┬──────┬───────┬───────────────────────────────┬───────┬────────────┤
│ MOUNTED ON                 │  SIZE │ USED │ AVAIL │              USE%             │ TYPE  │ FILESYSTEM │
├────────────────────────────┼───────┼──────┼───────┼───────────────────────────────┼───────┼────────────┤
│ /                          │ 97.9G │ 1.7G │ 91.2G │ [....................]   1.8% │ ext4  │ /dev/vda2  │
│ /run/credentials/systemd-s │    0B │   0B │    0B │                               │ ramfs │ ramfs      │
│ ysctl.service              │       │      │       │                               │       │            │
│ /run/credentials/systemd-s │    0B │   0B │    0B │                               │ ramfs │ ramfs      │
│ ysusers.service            │       │      │       │                               │       │            │
│ /run/credentials/systemd-t │    0B │   0B │    0B │                               │ ramfs │ ramfs      │
│ mpfiles-setup-dev.service  │       │      │       │                               │       │            │
│ /run/credentials/systemd-t │    0B │   0B │    0B │                               │ ramfs │ ramfs      │
│ mpfiles-setup.service      │       │      │       │                               │       │            │
╰────────────────────────────┴───────┴──────┴───────┴───────────────────────────────┴───────┴────────────╯
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ 20 special devices                                                                                              │
├──────────────────────────┬────────┬────────┬────────┬───────────────────────────────┬─────────────┬─────────────┤
│ MOUNTED ON               │   SIZE │   USED │  AVAIL │              USE%             │ TYPE        │ FILESYSTEM  │
├──────────────────────────┼────────┼────────┼────────┼───────────────────────────────┼─────────────┼─────────────┤
│ /dev                     │   1.9G │     0B │   1.9G │                               │ 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                 │   1.9G │     0B │   1.9G │                               │ tmpfs       │ tmpfs       │
│ /proc                    │     0B │     0B │     0B │                               │ proc        │ proc        │
│ /proc/sys/fs/binfmt_misc │     0B │     0B │     0B │                               │ binfmt_misc │ binfmt_misc │
│ /proc/sys/fs/binfmt_misc │     0B │     0B │     0B │                               │ autofs      │ systemd-1   │
│ /run                     │ 391.5M │ 512.0K │ 391.0M │ [....................]   0.1% │ tmpfs       │ tmpfs       │
│ /run/lock                │   5.0M │     0B │   5.0M │                               │ tmpfs       │ tmpfs       │
│ /run/user/0              │ 391.5M │     0B │ 391.5M │                               │ tmpfs       │ tmpfs       │
│ /sys                     │     0B │     0B │     0B │                               │ sysfs       │ sysfs       │
│ /sys/fs/bpf              │     0B │     0B │     0B │                               │ bpf         │ bpf         │
│ /sys/fs/cgroup           │     0B │     0B │     0B │                               │ cgroup2     │ cgroup2     │
│ /sys/fs/fuse/connections │     0B │     0B │     0B │                               │ fusectl     │ fusectl     │
│ /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/security     │     0B │     0B │     0B │                               │ securityfs  │ securityfs  │
│ /sys/kernel/tracing      │     0B │     0B │     0B │                               │ tracefs     │ tracefs     │
╰──────────────────────────┴────────┴────────┴────────┴───────────────────────────────┴─────────────┴─────────────╯

Done!

(Visited 59 times, 1 visits today)