Questions? Feedback? powered by Olark live chat software
Author Avatar

Find Disk Space Usage on Linux

Written by: on 14 December 2017 03:27 PM 14 December 2017 03:27 PM

Learn how to check free disk space in Linux operating system. An easier way on 'how to' free guidelines for learners.

To find your current disk space usage

Login to SSH

Type: df -h

If you are running out of disk space

To find where your space is going run the command: du -smh /*

This will tell you how much space each directory is taking. If you find for example /home is using a lot of space you can then do the same within the /home directory to drill down further e.g.: du -smbh /home/*

You can also use this command to find which directories are using the most space:

du -mxS / | sort -n | tail

Note that these commands will both take quite a while to return results, so you will need to be patient. If you are out of disk space and need to upgrade please see:

(1 vote(s))
Not helpful