Member-only story
Linux Commands for Checking How Much Space Is Left on Disk
1. Overview
Keeping tabs on available disk space is essential for the Linux system. When the machine runs low on storage, we risk experiencing performance issues and potential errors.
Luckily, Linux offers several packages that come with standard tools to help us quickly analyze how much free space we have left and what space is in use. For instance, the df command provides a system-wide overview of disk usage.
Also, these commands work across most standard Linux shells, including Bash, Zsh, and others.
In this tutorial, we’ll learn some Linux commands for checking disk space.
2. df Command
The df command (short for disk free) is a common starting point for determining how much space is left on the disk.
In its most basic form, df displays the available and used space on the Linux machine’s various filesystems:
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
overlay 61202244 2747816 55313104 5% /
tmpfs 65536 0 65536 0% /dev
shm 65536 0 65536 0% /dev/shm
/dev/vda1 61202244 2747816 55313104 5% /etc/hosts
tmpfs 2008640 0 2008640 0% /sys/firmware