Linux df Command with 10 Practical Examples

Linux df command is used for showing free disk space of a particular file system on Linux or Unix based systems. You can display summarize information of filesystem by just enter "df". In simple words, program df helps in getting information on any hard disks or mounted devices that includes CD, DVD, and flash drives. This blog covers Linux df Command with 10 Practical Examples.

Output format

Filesystemname of partition or filesystem
Sizesize of partition (in 1K-blocks)
Usedmemory allocated to the filesystem (in 1K-blocks)
Availablememory available to the filesystem (in 1K-blocks)
Use %use memory in percentage by using below formula:
{space used}/({space used} + {space free})
Mounted onfile system location or directory where a file system resides

Linux df Command with 10 Practical Examples

(1) Basic Example - Display information related to all available filesystem

By default, program df shows disk space in 1K-blocks. Just remember one thing, if you are not passing any argument, it will display information of all currently mounted file systems.

df

(2) Include every information related to the file system that includes duplicate, pseudo, and inaccessible entries

df -a

(3) To display human readable output

df -h

(4) Exclude file system with small size and mention total in end

df --total

(5) Display type of filesystem with other details

df -T

(6) Display information of specific location

df -T /run

(7) Combine two options in one query

df -Th

(8) Display all information related to file system and usage show in 1K-blocks

df -k

(9) List Inodes information

df -i

(10) Display all available options - Help

df --help

Conclusion

This blog covers the Linux program "df" with practical 10 examples that you can use while accessing Linux file systems information.

Subscribe us to receive more such articles updates in your email.

If you have any questions, feel free to ask in the comments section below. Nothing gives me greater joy than helping my readers!

Disclaimer: This tutorial is for educational purpose only. Individual is solely responsible for any illegal act.

You may also like...

Leave a Reply

Your email address will not be published.