HomeTech

How to Check Free Disk Space on Ubuntu & Other Linux

Like Tweet Pin it Share Email

How much disk space have I used?

The easiest way to find free disk space under Linux is to use the df command. The df command means diskless and of course indicates the free and available disk space on Linux systems.

on earth

The -h option displays the disk space in a user-readable format (MB and GB).

Here is the result of the df command for my Dell XPS system with Linux installed with a single encrypted disk :

Check the free space with the df command under Linux

If you are worried about the above results, don’t worry. I will explain a few things regarding checking the available disk space under Linux. I will also show you the GUI method for desktop Linux users.

Method 1: Check the free space under Linux with the df command (and understand the result)

When you use the df command to check your disk space, it shows you a number of filesystems with their size, used space, and free space. Normally, your current readers should be listed as one of the following:

  • /dev/sda
  • /dev/sdb
  • /dev/nvme0n1p

It’s not an absolute rule, but it allows you to easily spot a real hard drive in the crowd.

Your Linux system can have different partitions on the hard disk for boot, EFI, root, swap, home, etc.. In this case, these partitions are represented by a number at the end of the disk name, e.g. B. /dev/sda1, /dev/nvme0n1p2, etc.

The confirmation point allows you to determine which partition is used for which purpose. The root is set to /, EFI is set to /boot/EFI, etc.

In my case, I used 41% of the 232 gigabytes of space under the main directory. If you have 2 or 3 large bulkheads (e.g. carrot, house, etc.), you should do the calculation here.

Insight into the output of the df command

  • tmpfs: tmpfs (temporary file system) is used to store files in virtual memory. You can easily ignore this virtual file system.
  • udev: The udev file system is used to store information about devices connected to the system (e.g. USB, network card, CD-ROM, etc.). You can ignore that.
  • /dev/loop: These are interconnected devices. If you check the disk space in Ubuntu, you will see a lot of them because they are instant applications. Loops are virtual devices that give access to normal files in block form. Closed-loop devices place instant applications in a sandbox on their own virtual hard drive. Since they are under the main folder, you don’t have to count the space they occupy separately.

Memory missing? Check that all discs and bulkheads are mounted.

Don’t forget that the df command only indicates space for mounted file systems. If you use more than one Linux distribution (or operating system) on the same disk, or if you have multiple disks in your system, you must first mount them to see the free space on those partitions and disks.

For example, I have two SSDs and 4 or 5 Linux distributions installed on my Intel NUC. It only displays extra discs if I mount them explicitly.

You can use the lsblk command to view all disks and partitions in your system.

Once you have the name of the disk partition, you can mount it this way:

/dev/sdb2 /mnt

I hope this will give you a good overview of how to control disk space under Linux. Let’s see how we can do this graphically.

Method 2: Graphically check the free use of the disk

It is much easier to graphically check the available disk space in Ubuntu with the Disk Usage Analyzer tool.

Disk Usage Analysis Tool

Here you can see all real hard disks and partitions. You may need to mount some bulkheads by clicking on them. Displays disk usage for all mounted partitions.

Check Disk usage

Checking available disk space with the GNOME disk utility

Otherwise, the GNOME Discs utility is also a very useful tool.

GNOME Floppy Disk Tools

Start the tool and select the drive. Select a partition to see the free space. If the partition is not mounted, mount it first by clicking the playback icon.

Free disk space Check-in Ubuntu Desktop

I think all major desktop environments have some kind of graphical tool to control disk usage under Linux. You can find it in the menu of your Linux desktop system.

Read Also: 28 Best Safe ROM Download Sites 2021 (Latest ROMS)

Conclusion

Of course, there may be other ways and tools to control your storage space. I’ve shown you the most common command line and GUI methods for this purpose.

I have also explained some points that may make it difficult for you to understand how to use the disk. I hope you like it.

If you have any questions or suggestions, please send them to me in the Comment section.

Do you like what you read? Please share it with others.