1. Home
  2. Linux
  3. Diskonaut disk usage

How to use Diskonaut to find disk usage on Linux

Want an easy, quick way to determine what folders and files are taking up space on your Linux PC? Try out Diskonaut! It’s an excellent app that can quickly scan and show you an excellent visual representation of how your disk is in use.

In this guide, we’ll show you how to get the Diskonaut app working, and how to use it to find disk usage on Linux!

Installing Diskonaut on Linux

Before we go into how to use Diskonaut on Linux to find disk usage, we must demonstrate how to install it, as it is not a default application. Follow the instructions below that correspond to the Linux OS you currently use.

Ubuntu/Debian

Sadly, there is no binary release of Diskonaut for Ubuntu or Debian. As a result, if you’d like to use the app, you must build the software from scratch. Luckily, it isn’t difficult. To start the installation, open up a terminal window by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. Then, use the command below to install the latest Curl to your computer.

sudo apt install curl

Once the Curl tool is set up on your computer, use it to grab the installer for the latest Rust programming language. Diskonaut is written in Rust, and it is required to run the app and to compile the source code.

sudo curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Follow the on-screen instructions to get Rust installed on your system. Keep in mind that this needs to be run with the sudo command, as Rust must have system-level access.

When the Rust programming language is set up on your Ubuntu or Debian Linux system, you will need to set up the environment. Run the source command below.

source $HOME/.cargo/env

Finally, make use of the cargo command to grab the latest release of Diskonaut and install it on the system. Be sure to follow the on-screen prompts to get Diskonaut set up.

sudo cargo install diskonaut

After the program is installed, you can run the diskonaut command to use it on Ubuntu or Debian.

Arch Linux

On Arch Linux, Diskonaut is not in the software sources. However, there is an AUR package. To install it on your computer, start by installing the “Git” and “Base-devel” packages.

sudo pacman -S git base-devel

Once both packages are set up on your computer, use the git clone command to grab the latest release of Trizen, an AUR helper program that will automate the installation of Diskonaut.

git clone https://aur.archlinux.org/trizen.git

Install Trizen using the makepkg command.

cd trizen

makepkg -sri

Finally, set up Diskonaut with the following trizen -S command.

trizen -S diskonaut

Fedora

On Fedora, Diskonaut is very easy to install. Just use Dnf.

sudo dnf install diskonaut

OpenSUSE

On OpenSUSE Linux, there is no package for Diskonaut. However, it can be built. To do it, start by opening up a terminal window. Then, use the Zypper command to install Curl.

sudo zypper install curl

Once Curl is set up, follow the Ubuntu/Debian installation instructions, as they’re sure to work on OpenSUSE.

Use Diskonaut to find disk usage

Diskonaut is an excellent app, and it’s super easy to use. To find disk usage with it, start by launching a terminal window. Then, once the terminal window is open, follow the examples to learn how to use Diskonaut.

Scan the root directory

If you want to take a quick look at the disk usage of your entire Linux system, you will need to scan the root directory. To scan the root directory, run the following command below in a terminal window.

CAUTION: only run as root if you are an experienced Linux user, as running the command as root can delete system files.

sudo diskonaut /

By running this command, Diskonaut will tell you what the biggest folders are on the system at a glance. If you would like to enter any of these folders, use the arrow key to select a folder, and the Enter key to access it.

Need to delete something? Press the Backspace key.

Just want to take a look at the root directory but don’t want to delete anything? Run the command below.

 diskonaut /

Scan the home directory

You can use Diskonaut to take a look at the folders in your home directory if you’re trying to figure out what in this directory is causing increased disk usage.

diskonaut ~/

Once the Diskonaut app is done scanning, use the Arrow keys to select individual folders. To enter a folder, press the Enter key. To delete a file or folder, select an item in Diskonaut and press Backspace.

Scan a specific directory

Is there a specific directory you’d like to have Diskonaut scan? Here’s how to do it. First, run the diskonaut command but add the exact folder location onto the command. For example, to scan the /opt folder, you’d run:

diskonaut /opt

Or, for system-level access, add sudo to it.

sudo diskonaut /opt

Once you’ve scanned the folder you’d like to scan with Diskonaut, use the Arrow keys to navigate the scan results and press Enter to access folders and files. Press Backspace to delete files and folders.

Leave a Reply

Your email address will not be published. Required fields are marked *

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