Check Linux Disk Space: df & du Commands

In a Linux system, you can use the following command to check disk space usage:

  1. Use the df command, which displays the disk space usage of the file system. Enter the following command:
df -h

This command will display the disk space usage of all mounted file systems in a human-readable format using the -h parameter.

  1. Use the “du” command: this command displays the disk space usage of a specified directory or file. Enter the following command:
du -h /path/to/directory

This command will display the disk space usage of the specified directory, and show it in a human-readable format using the -h parameter.

With the above two commands, it’s easy to check the disk space usage in a Linux system.

bannerAds