How to List Disk Space Usage on Ubuntu: A Simple Guide

Monitoring disk space is essential to keep your Ubuntu system running smoothly and avoid unexpected crashes due to lack of storage. Fortunately, Ubuntu provides simple commands that allow you to check your disk usage quickly.

Using the df -Th Command

The df command displays information about disk space usage. The options -T and -h modify the output to show the filesystem type and human-readable sizes, respectively.

df -Th

This command will output a table listing all mounted filesystems, their types, total size, used space, available space, and mount points.

Understanding the Output

  • Filesystem: The name of the storage device or partition.
  • Type: The filesystem type (e.g., ext4, ntfs).
  • Size: Total capacity of the filesystem.
  • Used: Space currently used.
  • Available: Free space remaining.
  • Mounted on: Directory where the filesystem is mounted.

Other Useful Commands

  • du -sh /path/to/directory - Shows disk usage of a specific directory.
  • lsblk - Lists information about block devices.

Conclusion

Regularly checking disk space helps maintain your Ubuntu system's health. The df -Th command is a quick and effective way to get an overview of your storage usage.