System Administration

Essential System Tools: dust – more intuitive version of du

Last Updated on May 28, 2022

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
AlacrittyInnovative, hardware-accelerated terminal emulator
BleachBitSystem cleaning software. Quick and easy way to service your computer
bottomGraphical process/system monitor for the terminal
btop++Monitor usage and stats for CPU, memory, disks, network and processes
catfishVersatile file searching software
ClonezillaPartition and disk cloning software
CPU-XSystem profiler with both a GUI and text-based
CzkawkaFind duplicate files, big files, empty files, similar images, and much more
ddrescueData recovery tool, retrieving data from failing drives as safely as possible
dustMore intuitive version of du written in Rust
f3Detect and fix counterfeit flash storage
Fail2banBan hosts that cause multiple authentication errors
fdupesFind or delete duplicate files
FirejailRestrict the running environment of untrusted applications
GlancesCross-platform system monitoring tool written in Python
GPartedResize, copy, and move partitions without data
GreenWithEnvyNVIDIA graphics card utility
gtopSystem monitoring dashboard
gWakeOnLANTurn machines on through Wake On LAN
hyperfineCommand-line benchmarking tool
HyFetchSystem information tool written in Python
inxiCommand-line system information tool that's a time-saver for everyone
journalctlQuery and display messages from the journal
kmonManage Linux kernel modules with this text-based tool
KrusaderAdvanced, twin-panel (commander-style) file manager
NmapNetwork security tool that builds a "map" of the network
nmonSystems administrator, tuner, and benchmark tool
nnnPortable terminal file manager that's amazingly frugal
petSimple command-line snippet manager
PingnooGraphical representation for traceroute and ping output
ps_memAccurate reporting of software's memory consumption
SMCMulti-featured system monitor written in Python
TimeshiftReliable system restore tool
QDirStatQt-based directory statistics
QJournalctlGraphical User Interface for systemd’s journalctl
TLPMust-have tool for anyone running Linux on a notebook
UnisonConsole and graphical file synchronization software
VeraCryptStrong disk encryption software
VentoyCreate bootable USB drive for ISO, WIM, IMG, VHD(x), EFI files
WTFPersonal information dashboard for your terminal
Subscribe
Notify of
guest

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

4 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Ovoidster
Ovoidster
3 years ago

dust needs a man page.

Arjun
Arjun
3 years ago
Reply to  Ovoidster

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.

Ange
Ange
3 years ago

You forgot to mention there’s a snap available.

Paella
Paella
8 months ago

Hi!

Change this part:

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

to:

export PATH=$PATH:/home/$USER/cargo/bin

This way isn’t necessary to user intervention to mistake writing his user. 🙂