Hardware

Show Disk Usage With ‘ncdu’

In today’s article, we’re going to learn how to show disk usage with ‘ncdu’. It’ll be a fun terminal exercise that lets you see your disk usage. I’d say this is on par with a beginner article, ’cause it’s just some simple terminal commands. So, do read on!

If you think ‘ncdu’ sounds familiar, it may be from a previous article. You should probably read the intro to that article, as it will save you some time and is reasonably informative.

How To: Find Large Files Using ‘ncdu’

We’ll be using that same tool, but we’ll be using it in a different manner. That article explains what ‘ncdu’ is. In short, it stands NCurses Disk Usage and it’s a handy enough tool. It describes itself as:

ncdu – NCurses Disk Usage

There are a few ways to use ‘ncdu’ and we’ll be using it to show disk usage in this article. Because you have that handy link up there, I’m going to skip some sections of this article.

Show Disk Usage With ‘ncdu’:

This article requires an open terminal, like many other articles on this site. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

First, you’re going to need to install ‘ncdu’. Rather than duplicate work, please visit this article. Scroll down and you’ll see how to install ‘ncdu’. 

See? All these previous articles sure make some future articles easier.

Anyhow, now that you have ‘ncdu’ installed, just navigate to the root directory run ‘ncdu’ from the there.

cd / && ncdu

Depending on how much disk space you have attached to your system at the time, it could take a while to run. Let it run and eventually you’ll end up with a screen like this:

Pretty basic looking, right? Well, look deeper.

As you can see, the first line is highlighted. Well, use the arrow keys to move up and down. Then, use the left and right arrow keys to move back and forth. To keep it simple, if you want to dig deeper, just navigate to the directory you’re curious about and run ‘ncdu’ in that directory.

Hmm… I probably should have timed it. I set ‘ncdu’ running on a desktop with a couple of internal disks and attached to an external disk with a whole lot of files on it. It’s like an 8 TB disk and the system is still trying to process that bad boy.

It has been a while… It’s okay, I have faith, It’ll finish someday!

Anyhow, read the man page:

man ncdu

There’s more to be done with ‘ncdu’ when you want to explore disk usage. It can take a minute or ten to run, but the information is worth it.

Closure:

There you have it, a fairly short article that explains how to show disk usage with ‘ncdu’. It seemed like a good article to write and it was nice having already covered so much of it. That saves some time and I was a bit late in writing this one.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

KGIII

Retired mathematician, residing in the mountains of Maine. I may be old and wise, but I am not infallible. Please point out any errors. And, as always, thanks again for reading.

Recent Posts

View Detailed Hardware Information

There are many tools for showing your hardware information and today we'll get to view…

1 day ago

How To: Install Wine In Lubuntu

Today's article isn't going to be complicated or long as we are going to cover…

3 days ago

Update Python Packages (PIP)

We've had a run of Python packages recently and you can tell that I'm a…

5 days ago

Save A Command’s Output To A File (While Showing It In The Terminal)

The title is the best I can come up with to describe this exercise as…

1 week ago

Demystifying journalctl: A Comprehensive Guide to Linux System Logging

It was suggested that I write an article about journalctl, which seemed like a large…

1 week ago

Extract Text From Multiple File Types

Today we will have a fairly simple exercise as we're going to just use a…

2 weeks ago