LOGO

Check Disk Space Usage on Ubuntu - A Quick Guide

September 11, 2006
Check Disk Space Usage on Ubuntu - A Quick Guide

Understanding Disk Space Usage with the 'df -Th' Command

To quickly assess disk space utilization on a Linux or macOS system, a straightforward command can be employed. This involves opening a new Terminal window and executing a specific instruction.

The 'df -Th' Command Explained

The command df -Th is a powerful tool for displaying disk space information. It provides a human-readable overview of file system disk space usage.

Let's break down each component of this command:

  • df: Stands for "disk filesystem" and is the core command for reporting file system disk space usage.
  • -T: This option instructs df to print the file system type alongside the other information.
  • -h: This flag requests that the output be displayed in a "human-readable" format. This means sizes are shown in units like kilobytes (K), megabytes (M), gigabytes (G), and terabytes (T), making the information easier to interpret.

By combining these options, df -Th delivers a concise and easily understandable report of your system's disk space allocation.

After entering the command in the Terminal, the output will show a table. This table details the following for each mounted file system:

  • Filesystem: The name of the file system.
  • Type: The type of file system (e.g., ext4, hfs+).
  • Size: The total size of the file system.
  • Used: The amount of space currently used.
  • Avail: The amount of space still available.
  • Use%: The percentage of space currently used.
  • Mounted on: The mount point, indicating where the file system is attached to the directory structure.

This information is crucial for system administrators and users alike, enabling them to monitor disk space and prevent potential issues caused by full disks.

In essence, utilizing df -Th offers a rapid and effective method for gaining insight into your system’s disk space status.

#ubuntu#disk space#usage#df#check disk space#linux