Show disk space

The df command is used to display the available and used disk space in Raspbian. When invoked without any options, this command shows disk space usage on all partitions:

df command

As you can see from the picture above, the df command displayed the device files associated with the file systems, the total amount of space on the file systems, the used space on the file systems, the free space on the file systems, the percentage of used space, and the mount point. However, the disk space is shown in 1KB blocks. You can use the -h option to produce the output in a human-readable form:

df command h option

Now we got a more meaningful output, with disk sizes in GB. Notice that the size of our root filesystem (rootfs) is 6,3 GB. Out of this 6,3 GB, 2,5 GB is used (or 41% of the total space available).

Subscribe to our Newsletter

Like us on Facebook

top
Geek University 2019