{"id":8576,"date":"2021-07-20T12:38:44","date_gmt":"2021-07-20T12:38:44","guid":{"rendered":"https:\/\/linuxways.net\/?p=8576"},"modified":"2021-07-20T12:38:44","modified_gmt":"2021-07-20T12:38:44","slug":"df-command-in-linux","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/centos\/df-command-in-linux\/","title":{"rendered":"Df Command in Linux"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>You don&#8217;t know how much space is available on your hard drive, do you? Not sure if your hard drive has enough space to install a large file or application? Let\u2019s use the df command.<\/p>\n<p>df command is used to check the available space and total space on the drive.<\/p>\n<p>This article will show you how to use the df command in Linux as we go through below.<\/p>\n<h2>The syntax of df command<\/h2>\n<pre>$ df [options]... filesystem\u2026<\/pre>\n<p><strong>[options]<\/strong><\/p>\n<p><strong>-h <\/strong>display size in human-readable format<\/p>\n<p>$ df -h<\/p>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1326\" height=\"364\" class=\"wp-image-8577\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-594.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-594.png 1326w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-594-300x82.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-594-1024x281.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-594-768x211.png 768w\" sizes=\"auto, (max-width: 1326px) 100vw, 1326px\" \/><\/p>\n<p><strong>-a<\/strong> show information of all file system disk space usage<\/p>\n<pre>$ df -a<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1686\" height=\"1408\" class=\"wp-image-8578\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-595.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-595.png 1686w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-595-300x251.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-595-1024x855.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-595-768x641.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-595-1536x1283.png 1536w\" sizes=\"auto, (max-width: 1686px) 100vw, 1686px\" \/><\/p>\n<p><strong>-k<\/strong> show information of the file system in Bytes<\/p>\n<pre>$ df -k<\/pre>\n<p>output: <img loading=\"lazy\" decoding=\"async\" width=\"804\" height=\"184\" class=\"wp-image-8579\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-3.jpeg\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-3.jpeg 804w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-3-300x69.jpeg 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-3-768x176.jpeg 768w\" sizes=\"auto, (max-width: 804px) 100vw, 804px\" \/><\/p>\n<p><strong>-m<\/strong> show information of the file system in MB<\/p>\n<pre>$ df -m<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1396\" height=\"362\" class=\"wp-image-8580\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-596.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-596.png 1396w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-596-300x78.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-596-1024x266.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-596-768x199.png 768w\" sizes=\"auto, (max-width: 1396px) 100vw, 1396px\" \/><\/p>\n<p><strong>-i <\/strong>display file system inodes<\/p>\n<pre>$ df -i<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1412\" height=\"362\" class=\"wp-image-8581\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-597.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-597.png 1412w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-597-300x77.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-597-1024x263.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-597-768x197.png 768w\" sizes=\"auto, (max-width: 1412px) 100vw, 1412px\" \/><\/p>\n<p><strong>-T<\/strong> display type of file system<\/p>\n<pre>$ df -T<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1378\" height=\"364\" class=\"wp-image-8582\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-598.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-598.png 1378w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-598-300x79.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-598-1024x270.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-598-768x203.png 768w\" sizes=\"auto, (max-width: 1378px) 100vw, 1378px\" \/><\/p>\n<p><strong>-t <\/strong>show information of certain file<\/p>\n<p>for example, I will display <strong>ext4<\/strong> system:<\/p>\n<pre>$ df -t ext4<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1316\" height=\"144\" class=\"wp-image-8583\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-599.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-599.png 1316w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-599-300x33.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-599-1024x112.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-599-768x84.png 768w\" sizes=\"auto, (max-width: 1316px) 100vw, 1316px\" \/><\/p>\n<p><strong>-x <\/strong>exclude information of certain files<\/p>\n<p>For example, I don\u2019t want to display <strong>ext4<\/strong> system:<\/p>\n<pre>$ df -x ext4<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1360\" height=\"300\" class=\"wp-image-8584\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-600.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-600.png 1360w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-600-300x66.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-600-1024x226.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-600-768x169.png 768w\" sizes=\"auto, (max-width: 1360px) 100vw, 1360px\" \/><\/p>\n<p>If you use <strong>df<\/strong> command without [options], it will display all the information of the mounted file systems<\/p>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1334\" height=\"336\" class=\"wp-image-8585\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-601.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-601.png 1334w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-601-300x76.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-601-1024x258.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-601-768x193.png 768w\" sizes=\"auto, (max-width: 1334px) 100vw, 1334px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>You\u2019ve already gone through the details of how to use the df command in Linux.<\/p>\n<p>Thanks for reading.<\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction You don&#8217;t know how much space is available on your hard drive, do you? Not sure if your hard drive has enough space to install a large&hellip;<\/p>","protected":false},"author":1,"featured_media":8626,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,4,5,83,165,2],"tags":[439],"class_list":["post-8576","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-debian","category-mint","category-opensuse","category-red-hat","category-ubuntu","tag-df-command"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/8576","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=8576"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/8576\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/8626"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=8576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=8576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=8576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}