Utilities

Essential System Tools: dust – more intuitive version of du

This is the latest in our series of articles highlighting essential system tools. These are small, indispensable utilities, useful for system administrators as well as regular users of Linux based systems. The series examines both graphical and text based open source utilities. For details of all tools in this series, please check the table in the Summary section. article.

The Command Line Interface (CLI) is a way of interacting with your computer. To harness all the power of Linux, it’s highly recommended mastering the interface. It’s true the CLI is often perceived as a barrier for users migrating to Linux, particularly if they’re grown up using GUI software exclusively. While Linux rarely forces anyone to use the CLI, some tasks are better suited to this method of interaction, offering inducements like superior scripting opportunities, remote access, and being far more frugal with a computer’s resources.

dust gives an instant overview of which directories are using disk space. Its name derives from the du command and that dust is written in Rust. dust is intended to be more intuitive than du. Like du, it’s published under an open source license.

Installation

On a vanilla installation of Ubuntu 21.04, we first need to install cargo. That’s the Rust package manager. The software downloads your Rust package’s dependencies, compiles your packages, makes distributable packages, and uploads them to crates.io, the Rust community’s package registry.

cargo is available as a regular Ubuntu package or a snap. We chose to install the former:

$ sudo apt install cargo

Now we can proceed and install dust using cargo, with the command:

$ cargo install du-dust

By default du-dust is installed to ~/.cargo/bin

That directory isn’t in our PATH. PATH is an environment variable specifying a set of directories where executable programs are located. Let’s permanently add ~/.cargo/bin to our PATH. Fire up nano or whatever text editor you prefer and edit the .bashrc file.

$ nano ~/.bashrc

At the end of the file, add the line:

export PATH=$PATH:/home/user_name/.cargo/bin

Replace user_name with your username.

Save the file and exit. At the shell, enter the command:

$ source ~/.bashrc

Instead of the source command, you can log out and log into a new shell.

We are now ready to run dust.

Next page: Page 2 – In Operation

Pages in this article:
Page 1 – Introduction / Installation
Page 2 – In Operation
Page 3 – Summary


Complete list of articles in this series:

Essential System Tools
ps_memAccurate reporting of software's memory consumption
gtopSystem monitoring dashboard
petSimple command-line snippet manager
AlacrittyInnovative, hardware-accelerated terminal emulator
inxiCommand-line system information tool that's a time-saver for everyone
BleachBitSystem cleaning software. Quick and easy way to service your computer
catfishVersatile file searching software
journalctlQuery and display messages from the journal
NmapNetwork security tool that builds a "map" of the network
ddrescueData recovery tool, retrieving data from failing drives as safely as possible
NeofetchSystem information tool written in Bash
TimeshiftSimilar to Windows' System Restore functionality, Time Machine Tool in Mac OS
GPartedResize, copy, and move partitions without data
ClonezillaPartition and disk cloning software
fdupesFind or delete duplicate files
KrusaderAdvanced, twin-panel (commander-style) file manager
nmonSystems administrator, tuner, and benchmark tool
f3Detect and fix counterfeit flash storage
QJournalctlGraphical User Interface for systemd’s journalctl
QDirStatQt-based directory statistics
FirejailRestrict the running environment of untrusted applications
VeraCryptStrong disk encryption software
UnisonConsole and graphical file synchronization software
hyperfineCommand-line benchmarking tool
TLPMust-have tool for anyone running Linux on a notebook
nnnPortable terminal file manager that's amazingly frugal
GlancesCross-platform system monitoring tool written in Python
CPU-XSystem profiler with both a GUI and text-based
VentoyCreate bootable USB drive for ISO/WIM/IMG/VHD(x)/EFI files
Fail2banBan hosts that cause multiple authentication errors
dustMore intuitive version of du written in Rust
Share this article

3 comments

    1. Definitely, too many open source projects lack even basic documentation. I’ve helped out on a few projects but there’s often no volunteer to write docs. Not sexy as writing code so gets put last on occasions.

Share your Thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.