Show Disk Space Usage For All Mounted File Systems In Human Readable Format

df -h is a command used in Linux to display the disk usage statistics for all mounted file systems in human-readable format. Here's what each part of the command does:

  • df: This is the command for "disk free", used to display disk usage statistics.

  • -h: This is an option that tells df to display the sizes in "human-readable" format, using units such as KB, MB, GB, etc., instead of raw bytes.

When you run df -h, the command will output a list of all mounted file systems on your system, along with their usage statistics. Each line of the output will show the following information:

  • Filesystem: The name of the file system.

  • Size: The total size of the file system.

  • Used: The amount of disk space used on the file system.

  • Available: The amount of free disk space on the file system.

  • Use%: The percentage of the file system that is currently in use.

Here's an example of what the output of df -h might look like:


ubuntu@user: df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        20G  4.7G   15G  24% /
/dev/sdb1       100G   80G   20G  80% /home

In this example, you can see that there are two mounted file systems: /dev/sda1 and /dev/sdb1. /dev/sda1 has a total size of 20 GB, with 4.7 GB used and 15 GB available. /dev/sdb1 has a total size of 100 GB, with 80 GB used and 20 GB available.

Comments

Leave a Reply