To see total disk space on Linux, use the df -h command in the terminal; it shows every mounted filesystem with its total, used, and available space in human-readable units. For a quick summary of just the drives, df -h --total adds a final line with the combined totals across all filesystems.
What “Total Disk Space” Really Means on Linux
On Linux, disk space is not a single number. The operating system sees storage through filesystems—each a formatted partition or logical volume that holds files. A typical system has several: the root filesystem (/), a separate /home partition, an EFI boot partition, and possibly swap. The df command lists each one separately, so the “total” depends on whether you mean the sum of all filesystems or just the main storage drive.
For example, a laptop with a single solid-state drive might show /dev/sda1 mounted at / with a total of several hundred gigabytes, while a server with multiple drives could show several separate entries. The --total flag adds a bottom line that sums the totals, used, and available columns across all listed filesystems—but note that this includes virtual filesystems like tmpfs (which uses RAM) and overlay (used by containers), so the number may be larger than the physical storage.
How Linux Reports Disk Space: df, du, and lsblk
Three core commands give you different views of storage:
df(disk free) reports filesystem-level usage. Rundf -hto see totals in gigabytes or terabytes, anddf -h /to focus on the root filesystem.du(disk usage) shows how much space directories and files consume. For example,du -sh /homegives the total size of the home directory. It is useful for finding what is eating space.lsblklists block devices (physical drives and partitions) with their sizes. Runlsblkto see the raw capacity of each disk, independent of filesystems.
For a human-friendly overview, many distributions include graphical tools—like the Disks utility or a system monitor—that display the same information. The command line, however, is universal and works on any Linux system, including servers without a graphical interface.
Why the Total Might Not Match the Drive’s Label
If you buy a drive advertised as one terabyte, df will likely show a total of only a few hundred gigabytes. This is normal and has two causes. First, drive manufacturers use decimal units (one terabyte = one trillion bytes), while Linux and most operating systems use binary units (one tebibyte = about one trillion ninety-nine billion bytes). The difference is roughly ten percent. Second, a portion of the drive is reserved for the filesystem’s own metadata—the journal, inodes, and reserved blocks. The df output shows the usable space, not the raw capacity.
You can see the raw size of the physical disk with lsblk or fdisk -l (the latter requires root privileges). The difference between that number and the filesystem total is the overhead plus the difference between decimal and binary units.
How to Check Total Disk Space on Any Linux System
Open a terminal and type:
df -h— shows all mounted filesystems with sizes in human-readable form (e.g.,Gfor gigabytes).df -h --total— adds a final line with the sum of all filesystems.lsblk— shows the physical drives and partitions with their sizes.- For a specific directory, use
du -sh /path/to/dir.
If you want to see the total for the root filesystem only, df -h / is the most direct answer. The output includes the filesystem name, total size, used space, available space, use percentage, and the mount point.
Common Misconceptions About Disk Space on Linux
One frequent confusion is the difference between total disk space and available disk space. The df output shows both. The available space is what you can actually use without root privileges; the root user can often use a small reserved amount (usually five percent of the filesystem) to keep the system from failing when full.
Another misconception is that du and df should agree. They measure different things: df reports the filesystem’s view, while du sums file sizes. Discrepancies arise from deleted files still held open by processes, reserved blocks, and metadata. If df shows the disk full but du does not, a process may be holding a deleted file; restarting that process usually frees the space.
Finally, the --total flag in df does not give you the physical storage capacity. It sums all filesystems, including virtual ones like tmpfs that use RAM. For the true physical capacity, use lsblk.
Frequently Asked Questions
How do I see total disk space in Linux?
Run df -h in the terminal. The Size column shows the total for each filesystem. To see a single combined total, add --total to the command.
Why does df show less space than the drive’s label?
Drive manufacturers use decimal units (one gigabyte = one billion bytes), while Linux uses binary units (one gibibyte = about one billion seventy-three million bytes). Also, the filesystem reserves space for metadata and system use. The difference is normal and not a defect.
What is the difference between df and du?
df reports the free and used space on entire filesystems, while du calculates the size of directories and files. Use df to see how full a disk is, and du to find which folders are consuming the most space.
How do I check disk space on a remote Linux server?
Connect via SSH and run the same commands: df -h and lsblk. These work on any Linux distribution without needing a graphical interface.
Can I increase the total disk space without adding a new drive?
If you are using logical volume management (LVM), you can extend a logical volume if there is unallocated space in the volume group. Otherwise, you would need to resize the partition or add a new drive. This is an advanced operation; back up your data first and consult your distribution’s documentation.
Summary: The Total Is Context-Dependent
There is no single “total disk space” value on Linux because the system manages multiple filesystems. The most useful answer comes from df -h, which shows each filesystem’s total, used, and available space. For the physical drive capacity, use lsblk. Understanding the difference between the two helps you interpret the numbers correctly and avoid confusion when a drive appears smaller than expected.