Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

Duf – A Better Linux Disk Monitoring Utility - DesignLinux

Feb 25 2021
designlinux 0 Comments

duf is one of the fancy Linux disk monitoring utilities written in Golang. It is released under MIT license and It supports Linux, macOS, BSD, and even Windows too. Some of the core features of duf include:

  • a better ‘df command‘ alternative.
  • Light and Dark color scheme.
  • Output in JSON format.
  • Option to sort, group, and filter output.
  • Adjustable terminal Height and Width.

Installing Duf (Disk Usage) Tool in Linux

There are two ways you can install DUF. You can either build it from the source or download the setup in native format (.rpm or .deb) specific to Linux distribution and install it. I will walk you through both methods.

Building Duf from Source

You need to set up the Go (1.12 or above) environment to compile duf. If you don’t have Go set up in your machine, take a look at our comprehensive article on how to set up Go in Ubuntu.

$ git clone https://github.com/muesli/duf.git
$ cd duf
$ go build

Installing Duf from Packages

You can download the duf package from the Github repo directly or use the wget command.

--------- On Debina, Ubuntu & Mint --------- 
$ wget https://github.com/muesli/duf/releases/download/v0.6.0/duf_0.6.0_linux_amd64.deb
$ dpkg -i duf_0.6.0_linux_amd64.deb 


--------- On RHEL, CentOS & Fedora ---------
$ wget https://github.com/muesli/duf/releases/download/v0.6.0/duf_0.6.0_linux_amd64.rpm
$ rpm -ivh duf_0.6.0_linux_amd64.rpm

Usage of Duf (Disk Usage) Tool in Linux

Now, launch the application by simply typing duf from the terminal.

$ duf
Linux Disk Usage
Linux Disk Usage

Duf has a lot of features, so a good place to start would be to use --help option.

$ duf --help
Duf Help
Duf Help

You can print only specific file systems or devices by passing it as an argument. Since I created this machine in a single partition everything is mounted on the root (/). Based upon your partition scheme you will see different output.

$ duf /home /usr /opt
$ duf /root/
$ duf /var/log
Check Disk Usage of Partitions
Check Disk Usage of Partitions

You can pass --all flag to display Pseudo, inaccessible, and duplicate file systems.

$ duf -all
Duf Options
Duf Options

Instead of printing block usage, we can print Inode usage bypassing --inodes as an argument.

$ duf --inodes
Check Linux Inode Usage
Check Linux Inode Usage

You can sort output or display only certain columns based on certain keywords.

$ duf --sort size

You have the option to print only certain columns bypassing the column name as an argument to --output flag.

$ duf --output used,size,avail,usage
Linux Disk Usage Summary
Linux Disk Usage Summary

Below are the list of valid keywords.

  • mountpoint
  • size
  • used
  • avail
  • usage
  • inodes
  • inodes_used
  • inodes_avail
  • inodes_usage
  • type
  • filesystem

Duf comes with a light and dark color scheme. To set the color scheme, use the following commands.

$ duf -theme dark               # Dark color scheme
$ duf --theme light             # Light color scheme
Check Duf Color Scheme
Check Duf Color Scheme

Duf supports output in JSON format.

$ duf --json
Duf JSON Format
Duf JSON Format

That’s it for this article. Duf is a maturing tool and there are more features and bug fixes added to it. Try it and let us know your feedback.

Related

Tags: Linux Disk Monitoring Tools, Linux Disk Scanning Utilities

How to Use Two-Factor Authentication with Ubuntu

Prev Post

What is Automation and Configuration Management with CHEF – Part 1

Next Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 3
  • 619
  • 1,055,391

DesignLinux.com © All rights reserved

Go to mobile version