Linux Find What is Using Disk Space


“It’s crucial to manage storage capacity on a Linux system. Programs that act as package managers, for instance, alert you to the amount of disc space needed for setup. You need to be aware of the amount of free space on your machine for that knowledge to be useful. There are several utilities available in the Linux systems to discover what is using the disk space of our system. Discover how to examine the disc space in Ubuntu using the df utility as well as how to view the file system’s disc space consumption using the “du” software right through this lesson.”

Update System

Before checking the disk house utilization, we wish to replace our machine to make it absolutely up to date in order that the reminiscence house will also be displayed as it should be. For this, check out opening the console software of your Linux machine with the usage of the “Ctrl+Alt+T” shortcut. It can be launching the console temporarily in a couple of seconds. We have attempted the apt instruction with the sudo rights adopted through the key phrase “update”. The execution asks for the “password” of the lately energetic consumer this present day. We have added the password, and the method continues.

Check Disk Space Usage With Df Utility

The major machine section that makes use of the reminiscence greater than the rest is the disk, typically in all working programs. To in finding the quantity of house utilized by the disk within the Ubuntu 20.04 machine, we will be able to be using the “df” software of our machine. The df software, which refers to disk unfastened, shows how a lot house every force is the use of. Values are proven through df through a typical in 1-kilobyte gadgets. Within the “df” command output beneath, we’ve been proven the gap utilized by the document machine and the machine’s comparable portions. It additionally displayed the share utilization of house within the output.

Check Disk Space Usage in Mega & Gega Bytes

Within the above output, the disk house utilization has been displayed within the 1-kilobyte structure, whilst within the “used” and “available” column, we will be able to simplest see disk house price in numbers, i.e., simply comprehensible. So, to show the disk house output in a extra human-readable presentable structure in order that any laptop consumer can comprehend it temporarily and get any form of data required. For this, we wish to use the “df” instruction with its “-h” choice within the question house, as we’ve used this instruction within the connected photograph. The output for the Size, Used, and Avail column has now displayed the lead to Kilobytes, megabytes, and gigabytes after the conversion. While the “Use%”, and “Mounted on” columns have were given no alternate in them.

You too can employ the “df” instruction in step with your wishes. Let’s say you simplest need to search for the dimensions of disk house, its to be had house, and its used house for your shell display screen. For this, you want to make use of the “df” instruction with the “-H” choice and the column names from the specific house desk, i.e., Size, used, avail, as offered within the symbol beneath. The output beneath has displayed the knowledge for those 3 columns and didn’t establish this system or disk.

Check Disk Space Usage for File System

The exact same “df” instruction can be used within the console with its “-h” way to show the disk house utilized by the document machine used to your Linux machine. So, we’ve attempted this instruction to test the gap utilized by the “dev/sda2” software document machine. The output displays that the disk “dev/sda” has a dimension of two.4GB whilst 0 bytes are used, and the remainder is to be had for use.

The use of the “df” instruction with the “-h” choice and the “/” personality displays the quantity of house used at the number one disk garage software. So, we’ve attempted it and located that the main disk “dev/sda5” has a dimension of 30GB whilst 14GB has been used and 15GB has been left unused and can be used in a while.

Check Disk Space Usage for File System through Type

You can attempt to in finding out the disk house utilization for the document machine in step with the kind of document machine. For this, you want to make use of the “-ht” choice inside the “df” instruction together with the document machine kind, i.e., ext4 in our case. The output on our monitors is appearing rather an identical output as above whilst the “mounted on” column has just a “/”.

Check Disk Space Usage With Du Utility

Disk use is noticed by the use of the du software. You might see your disc efficiency in additional element with this software through the use of Ubuntu 20.04 Console software to turn the disk utilization for sure folders. Use it to turn how a lot garage your provide listing is the use of, as we did within the beneath presentation. The left aspect numerical price displays the knowledge dimension, and the precise aspect displays all information and folders of our machine.

The “du” instruction, together with the “-h” choice, has been appearing the gap utilized by the folders in kilobytes on the console software display screen of our machine, as offered within the connected symbol.

If you need to determine the gap utilized by your present running listing, you should make the most of the “du” instruction with the blended choice “-hs”. The outcome shows that it incorporates a complete of 106MB of knowledge inside the machine.


We have elaborated on the preferred use of the disk house idea together with the other utilities of our Linux working machine. Firstly, we’ve attempted to replace our machine to keep away from any problems. After that, we mentioned the usage of “df” and “du” directions one at a time to look how a lot house has been used by a specific disk force. We have attempted the “df” and “du” directions with the “-H” or “-h” directions for the view of disk house utilization within the Kilobytes, Megabytes, and Giga bytes. Hence, we’ve attempted to hide each and every minor element on this article.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More