How to View Disk Space Used in Ubuntu?

The shift from the Windows graphical user interface to the Ubuntu terminal environment might be difficult. Nothing is familiar now, and even the most basic activities have become tough.

Examining your spent or available disk space is one such process. Don’t be concerned; obtaining disk space in Ubunutu is fairly simple.

Here’s how to see how much disk space you’ve used in Ubuntu.

How to view Total Disk Space Used in Ubuntu?


To get the total disk space used in Ubuntu, we will use two commands. The first command will give us our filesystem.

We will then use that information to get our used and available space left. Our two commands will be fdisk and df.

Step 1: Find your Filesystem

First, let’s look up our filesystem. In your terminal type

fdisk -l

The terminal will spit out a lot of information, but we’re just interested in the least bit. You will be given a list of “Devices,” with the one with the largest “Size” being the one we want. In our case, it is “/dev/vda1.

Device      Start       End   Sectors  Size Type
/dev/vda1  227328 167772126 167544799 79.9G Linux filesystem
/dev/vda14   2048     10239      8192    4M BIOS boot
/dev/vda15  10240    227327    217088  106M Microsoft basic data

 

Step 2: Check Used and Available Space

Next, we will look up our used and available space. In your terminal type

df -h [FILE SYSTEM FROM STEP 1]

In our second argument, we will use the “Device” we discovered in the previous phase. So, in our case, we’ll do df -h /dev/vda1.

Your filesystem argument will very likely differ.

Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        78G   46G   32G  59% /

We now have the information we were looking for. The overall size of your drive is displayed, as well as the presently utilized space, available space, and % used.

Of course, now that we know our filesystem, we may skip the first step. The df command can also be used without the filesystem parameter.

This will provide us with several filesystems. You may select the one you want from the list and view the same information.

df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           395M  1.6M  393M   1% /run
/dev/vda1        78G   46G   32G  59% /
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
spot_img

Subscribe

Related articles

How to get million views on youtube?

To get a million views on YouTube, you will...

Can I create a custom dashboard in react?

Yes, you can create a custom dashboard in React....

All You Need to Know About Xbox 360 Backward Compatibility

The Xbox 360 works well with some games that...

How to Check if an Array has More than One Element in PHP?

An array is a group of data structures. In...

Learn How to Select All in VIM?

Now is the time to improve your VIM skills...
spot_img
Peter Graham
Peter Grahamhttps://fix-iphones.com
Hi there! I'm Peter, a software engineer and tech enthusiast with over 10 years of experience in the field. I have a passion for sharing my knowledge and helping others understand the latest developments in the tech world. When I'm not coding, you can find me hiking or trying out the latest gadgets.

LEAVE A REPLY

Please enter your comment!
Please enter your name here