Check Linux Disk Space: df & du Guide

You can use the following command in Linux system to check the disk space of the computer:

  1. Check the overall disk space usage using the df command.
df -h

This command will display the disk space usage of all mounted file systems, including information on used space, available space, and mount points.

  1. View the disk space usage of a specified directory or file using the du command.
du -h /path/to/directory

This command will display the disk space usage of files or subdirectories within the specified directory.

These two commands provide a comprehensive overview of how disk space is being utilized in a Linux system.

bannerAds