How to Check disk space in Linux

You can check the storage space size in Linux system by using the following command:

  1. By using the df command, you can view the disk space usage of the file system. Input the following command to see the total storage space of the entire system:
df -h

The -h flag is used to display storage space size in a readable format.

  1. Using the “du” command: this command can display the disk space usage of specified directories or files. Enter the following command to view the storage space size of a specified directory:
du -h /path/to/directory

The -h parameter is also used to display storage space size in a readable format.

You can view the size information of storage space in a Linux system using the two commands above.

bannerAds