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.
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:
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.
Complete list of articles in this series:
|Essential System Tools|
|ps_mem||Accurate reporting of software's memory consumption|
|gtop||System monitoring dashboard|
|pet||Simple command-line snippet manager|
|Alacritty||Innovative, hardware-accelerated terminal emulator|
|inxi||Command-line system information tool that's a time-saver for everyone|
|BleachBit||System cleaning software. Quick and easy way to service your computer|
|catfish||Versatile file searching software|
|journalctl||Query and display messages from the journal|
|Nmap||Network security tool that builds a "map" of the network|
|ddrescue||Data recovery tool, retrieving data from failing drives as safely as possible|
|Neofetch||System information tool written in Bash|
|Timeshift||Similar to Windows' System Restore functionality, Time Machine Tool in Mac OS|
|GParted||Resize, copy, and move partitions without data|
|Clonezilla||Partition and disk cloning software|
|fdupes||Find or delete duplicate files|
|Krusader||Advanced, twin-panel (commander-style) file manager|
|nmon||Systems administrator, tuner, and benchmark tool|
|f3||Detect and fix counterfeit flash storage|
|QJournalctl||Graphical User Interface for systemd’s journalctl|
|QDirStat||Qt-based directory statistics|
|Firejail||Restrict the running environment of untrusted applications|
|VeraCrypt||Strong disk encryption software|
|Unison||Console and graphical file synchronization software|
|hyperfine||Command-line benchmarking tool|
|TLP||Must-have tool for anyone running Linux on a notebook|
|nnn||Portable terminal file manager that's amazingly frugal|
|Glances||Cross-platform system monitoring tool written in Python|
|CPU-X||System profiler with both a GUI and text-based|
|Ventoy||Create bootable USB drive for ISO/WIM/IMG/VHD(x)/EFI files|
|Fail2ban||Ban hosts that cause multiple authentication errors|
|dust||More intuitive version of du written in Rust|