How to Check Directory Size in Linux

Understanding how much disk space a directory is consuming is one of the most practical skills in Linux administration — whether you're managing a home system, a web server, or a shared environment. Linux gives you several ways to measure directory size, and the right approach depends on what you're trying to find out. 📁

The du Command: Your Primary Tool

The du (disk usage) command is the standard way to check directory size in Linux. It reads how much disk space a directory and its contents are actually using — which can differ from the sum of individual file sizes due to how filesystems allocate blocks.

Basic syntax: