0% found this document useful (0 votes)
130 views5 pages

Use Gdu For A Faster Disk Usage Checking in Linux Terminal - It's FOSS

Gdu is a disk usage checking tool for Linux terminals that is faster than traditional tools like du and df, especially on SSDs. It provides a TUI interface for navigating directories and disks using arrow keys to sort usage by name or size. Symbols are used to indicate issues or link types. The gdu -d option shows utilization and free space for all mounted disks on one screen. It can be installed through the AUR on Arch or from source, or using Snap commands on Ubuntu.

Uploaded by

Krishanu Modak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views5 pages

Use Gdu For A Faster Disk Usage Checking in Linux Terminal - It's FOSS

Gdu is a disk usage checking tool for Linux terminals that is faster than traditional tools like du and df, especially on SSDs. It provides a TUI interface for navigating directories and disks using arrow keys to sort usage by name or size. Symbols are used to indicate issues or link types. The gdu -d option shows utilization and free space for all mounted disks on one screen. It can be installed through the AUR on Arch or from source, or using Snap commands on Ubuntu.

Uploaded by

Krishanu Modak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Use gdu for a Faster Disk Usage Checking in Linux Terminal

Last updated March 16, 2021 By Abhishek Prakash (https://itsfoss.com/author/abhishek/)

There are two popular ways to check disk usage in Linux terminal (https://linuxhandbook.com/df-
command/): du command and df command. The du command is more for checking the space used
by a directory (https://linuxhandbook.com/find-directory-size-du-command/) and the df command
gives you the disk utilization on filesystem level.

There are more friendly ways to see the disk usage in Linux with graphical tools like GNOME Disks
(https://itsfoss.com/check-free-disk-space-linux/). If you are confined to the terminal, you can use a
TUI (https://itsfoss.com/gui-cli-tui/) tool like ncdu (https://dev.yorhel.nl/ncdu) to get the disk usage
information with a sort of graphical touch.

Gdu: Disk usage checking in Linux terminal


Gdu (https://github.com/dundee/gdu) is such a tool written in Go (hence the ‘g’ in gdu). Gdu
developer has benchmark tests (https://github.com/dundee/gdu#benchmarks) to show that it is
quite fast for disk usage checking, specifically on SSDs. In fact, gdu is intended primarily for SSDs
though it can work for HDD as well.

If you use the gdu command without any options, it shows the disk usage for the current directory
you are in.
Since it has terminal user interface (TUI), you can navigate through directories and disk using arrows.
You can also sort the result by file names or size.

Here’s how to do that:

Up arrow or k to move cursor up


Down arrow or j to move cursor down
Enter to select directory / device
Le arrow or h to go to parent directory
Use d to delete the selected file or directory
Use n to sort by name
Use s to sort by size
Use c to sort by items

You’ll notice some symbols before some file entries. Those have specific meaning.
!  means an error occurred while reading the directory.
.  means an error occurred while reading a subdirectory, size may not be correct.
@  means file is a symlink or socket.
H  means the file was already counted (hard link).
e  means directory is empty.

To see the disk utilization and free space for all mounted disks, use the option d :

gdu -d

It shows all the details in one screen:


Sounds like a handy tool, right? Let’s see how to get it on your Linux system.

Installing gdu on Linux


Gdu is available for Arch and Manjaro users through the AUR (https://itsfoss.com/aur-arch-linux/). I
presume that as an Arch user, you know how to use AUR.

It is included in the universe repository of the upcoming Ubuntu 21.04 but chances are that you are
not using it at present. In that case, you may install it using Snap through it may seem like a lot of
snap commands:

snap install gdu-disk-usage-analyzer


snap connect gdu-disk-usage-analyzer:mount-observe :mount-observe
snap connect gdu-disk-usage-analyzer:system-backup :system-backup
snap alias gdu-disk-usage-analyzer.gdu gdu
You may also find the source code on its release page:

Source code download for gdu (https://github.com/dundee/gdu/releases)

I am more used to of using du and df commands but I can see some Linux users might like gdu. Are
you one of them?

You might also like