{"id":211,"date":"2026-06-02T23:01:18","date_gmt":"2026-06-03T06:01:18","guid":{"rendered":"https:\/\/hostandtech.com\/kb\/linux\/how-to-check-disk-usage-on-linux\/"},"modified":"2026-06-02T23:01:18","modified_gmt":"2026-06-03T06:01:18","slug":"how-to-check-disk-usage-on-linux","status":"publish","type":"post","link":"https:\/\/hostandtech.com\/kb\/linux\/how-to-check-disk-usage-on-linux\/","title":{"rendered":"How to Check Disk Usage on Linux: df and du Commands Explained"},"content":{"rendered":"<h2>Overview<\/h2>\n<p>Disk usage problems are one of the most common support tickets we see on shared hosting, VPS, and dedicated servers alike. A full disk doesn&#8217;t just mean you can&#8217;t upload files \u2014 it can crash running services, corrupt databases, and make your server completely unresponsive. Knowing how to check disk usage on Linux quickly and accurately is a core skill for anyone managing a server.<\/p>\n<p>Linux gives you two primary tools for this: <code class=\"\" data-line=\"\">df<\/code>, which shows you how full your mounted filesystems are, and <code class=\"\" data-line=\"\">du<\/code>, which drills into directories to find out exactly what&#8217;s taking up space. They&#8217;re complementary \u2014 <code class=\"\" data-line=\"\">df<\/code> tells you <em>that<\/em> you have a problem, <code class=\"\" data-line=\"\">du<\/code> tells you <em>where<\/em> it is.<\/p>\n<p>This article covers both commands with real hosting examples \u2014 including the non-obvious stuff that trips people up, like deleted files that still hold disk space, and why <code class=\"\" data-line=\"\">df<\/code> and <code class=\"\" data-line=\"\">du<\/code> sometimes report different numbers.<\/p>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>SSH access to your Linux server (root or sudo user)<\/li>\n<li>A terminal client \u2014 PuTTY on Windows, Terminal on macOS\/Linux<\/li>\n<li>Basic comfort with the command line (you don&#8217;t need to be an expert)<\/li>\n<li>These commands work on any modern Linux distribution: Ubuntu 20.04+, Debian 11+, CentOS 7+, AlmaLinux 8\/9, Rocky Linux 8\/9<\/li>\n<\/ul>\n<h2>Step 1: Check Overall Filesystem Disk Usage with df<\/h2>\n<p>Start here. Before hunting through directories, get a high-level view of all your mounted filesystems.<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-1\"><code class=\"\" data-line=\"\">df -h<\/code><\/pre>\n<\/div>\n<p>The <code class=\"\" data-line=\"\">-h<\/code> flag means human-readable \u2014 it shows sizes in GB and MB instead of raw kilobyte blocks. Your output will look something like this:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-2\"><code class=\"\" data-line=\"\">Filesystem      Size  Used Avail Use%  Mounted on\n\/dev\/vda1        50G   43G  7.0G  87%  \/\ntmpfs           2.0G     0  2.0G   0%  \/dev\/shm\n\/dev\/vda2       100G   12G   88G  12%  \/home<\/code><\/pre>\n<\/div>\n<p>Focus on the <strong>Use%<\/strong> column and the <strong>Mounted on<\/strong> column. If your root filesystem (<code class=\"\" data-line=\"\">\/<\/code>) is at 90% or above, you&#8217;re in the danger zone. At 100%, your server will start failing in unpredictable ways.<\/p>\n<p>\ud83d\udcdd Note: On cPanel servers, <code class=\"\" data-line=\"\">\/home<\/code> is usually a separate partition where all user accounts and website files live. Check both <code class=\"\" data-line=\"\">\/<\/code> and <code class=\"\" data-line=\"\">\/home<\/code> independently.<\/p>\n<p>If you want to check a specific filesystem or directory&#8217;s total allocation:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-3\"><code class=\"\" data-line=\"\">df -h \/home<\/code><\/pre>\n<\/div>\n<h2>Step 2: Check Inode Usage<\/h2>\n<p>Here&#8217;s something that catches a lot of people off guard. Your disk can show free space but your server still refuses to create new files. The culprit is usually inodes.<\/p>\n<p>Every file and directory on a Linux filesystem uses one inode \u2014 a metadata slot. Some partitions run out of inodes long before they run out of raw storage, especially on servers hosting lots of small files (email servers and WordPress sites with thousands of cache fragments are classic offenders).<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-4\"><code class=\"\" data-line=\"\">df -i<\/code><\/pre>\n<\/div>\n<p>Output looks like this:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-5\"><code class=\"\" data-line=\"\">Filesystem      Inodes   IUsed   IFree IUse%  Mounted on\n\/dev\/vda1      3276800  3276799       1  100%  \/\n\/dev\/vda2      6553600   280000  6273600    4%  \/home<\/code><\/pre>\n<\/div>\n<p>\u26a0 Warning: If <code class=\"\" data-line=\"\">IUse%<\/code> is at 100% on any partition, file creation will fail completely on that partition \u2014 even if <code class=\"\" data-line=\"\">df -h<\/code> shows plenty of free space. This is one of the most confusing situations on a Linux server because the error messages don&#8217;t always make the inode issue obvious.<\/p>\n<p>I&#8217;d recommend running <code class=\"\" data-line=\"\">df -ih<\/code> (combines inode and human-readable output) as part of any routine disk health check.<\/p>\n<h2>Step 3: Find What&#8217;s Using Space with du<\/h2>\n<p>Once you know a filesystem is filling up, use <code class=\"\" data-line=\"\">du<\/code> to find out what&#8217;s actually in there. Running <code class=\"\" data-line=\"\">du<\/code> on <code class=\"\" data-line=\"\">\/<\/code> without arguments will produce thousands of lines and take a while \u2014 use these targeted approaches instead.<\/p>\n<p><strong>Find the top space consumers in the current directory:<\/strong><\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-6\"><code class=\"\" data-line=\"\">du -sh * | sort -rh | head -20<\/code><\/pre>\n<\/div>\n<p>Breaking that down: <code class=\"\" data-line=\"\">-s<\/code> gives a summary per item instead of recursing into every subdirectory, <code class=\"\" data-line=\"\">-h<\/code> makes it human-readable, <code class=\"\" data-line=\"\">sort -rh<\/code> sorts by size descending (largest first), and <code class=\"\" data-line=\"\">head -20<\/code> limits output to the top 20 results.<\/p>\n<p><strong>Scan a specific directory and summarise subdirectories:<\/strong><\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-7\"><code class=\"\" data-line=\"\">du -sh \/home\/*\/<\/code><\/pre>\n<\/div>\n<p>On a cPanel server, this gives you a quick per-account breakdown \u2014 useful for identifying which user account is consuming the most space.<\/p>\n<p><strong>Drill deeper \u2014 find the largest directories under \/var:<\/strong><\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-8\"><code class=\"\" data-line=\"\">du -h --max-depth=2 \/var | sort -rh | head -20<\/code><\/pre>\n<\/div>\n<p><code class=\"\" data-line=\"\">\/var<\/code> is where logs, mail queues, and database files typically live. On busy servers it&#8217;s often where runaway disk usage hides.<\/p>\n<p>\ud83d\udcdd Note: <code class=\"\" data-line=\"\">du<\/code> requires read access to the directories it scans. Always run it as root or with <code class=\"\" data-line=\"\">sudo<\/code> when scanning system directories, or you&#8217;ll get a lot of &#8220;Permission denied&#8221; errors that skew your results.<\/p>\n<h2>Step 4: Find Large Files Directly<\/h2>\n<p>Sometimes a single massive log file or a forgotten database dump is the whole problem. This command finds every file over 500MB on the filesystem:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-9\"><code class=\"\" data-line=\"\">find \/ -xdev -type f -size +500M -exec ls -lh {} ; 2&gt;\/dev\/null | sort -k5 -rh<\/code><\/pre>\n<\/div>\n<p>The <code class=\"\" data-line=\"\">-xdev<\/code> flag tells <code class=\"\" data-line=\"\">find<\/code> not to cross filesystem boundaries \u2014 without it, on servers with multiple mounts, you&#8217;ll get duplicate results and the command runs much slower. The <code class=\"\" data-line=\"\">2&gt;\/dev\/null<\/code> suppresses permission-denied errors so the output stays clean.<\/p>\n<p>Adjust <code class=\"\" data-line=\"\">+500M<\/code> to whatever threshold makes sense for your situation \u2014 <code class=\"\" data-line=\"\">+1G<\/code> for dedicated servers, <code class=\"\" data-line=\"\">+100M<\/code> on smaller plans.<\/p>\n<h2>Step 5: Check for Deleted Files Still Holding Space<\/h2>\n<p>This is the gotcha that experienced sysadmins know and beginners don&#8217;t. When a process has a file open and you delete that file, Linux unlinks it from the directory \u2014 but the disk space isn&#8217;t released until the process closes its file handle. <code class=\"\" data-line=\"\">df<\/code> will still show the space as used, but <code class=\"\" data-line=\"\">du<\/code> won&#8217;t find the file because it&#8217;s no longer linked to any directory.<\/p>\n<p>On hosting servers, this happens constantly with log files that are deleted while Apache, Nginx, or MySQL is still writing to them.<\/p>\n<p>To find these ghost files:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-10\"><code class=\"\" data-line=\"\">lsof +L1 2&gt;\/dev\/null | grep -i deleted<\/code><\/pre>\n<\/div>\n<p><code class=\"\" data-line=\"\">+L1<\/code> shows files with a link count below 1 \u2014 meaning they&#8217;ve been unlinked (deleted) but are still open. The fix is to either restart the process holding the file open, or truncate the file in place instead of deleting it:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-11\"><code class=\"\" data-line=\"\">&gt; \/path\/to\/the\/deleted-but-open.log<\/code><\/pre>\n<\/div>\n<p>That empties the file without closing the file handle, so the process keeps running and the disk space is freed immediately. I&#8217;d recommend this over restarting services during production hours.<\/p>\n<h2>Common Issues and Troubleshooting<\/h2>\n<h3>df and du Report Very Different Numbers<\/h3>\n<p>If <code class=\"\" data-line=\"\">df -h<\/code> shows 90% used but <code class=\"\" data-line=\"\">du -sh \/<\/code> only accounts for 60% of that space, deleted-but-open files are almost always the reason. Run <code class=\"\" data-line=\"\">lsof +L1<\/code> as described above. Restarting the offending service (or truncating the open file) will reconcile the numbers and free the space.<\/p>\n<h3>&#8220;No space left on device&#8221; but df Shows Free Space<\/h3>\n<p>You&#8217;ve hit the inode limit. Run <code class=\"\" data-line=\"\">df -i<\/code> to confirm. The most common cause on web hosting servers is a mail queue full of small files, or a WordPress install that has accumulated thousands of tiny cache files. Find the directory with the most files:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-12\"><code class=\"\" data-line=\"\">find \/home -xdev -type f | cut -d\/ -f1-4 | sort | uniq -c | sort -rn | head -20<\/code><\/pre>\n<\/div>\n<p>Clear the cache or flush the mail queue, and your inode count will drop immediately.<\/p>\n<h3>du Takes Forever or Hangs<\/h3>\n<p>Running <code class=\"\" data-line=\"\">du<\/code> on a directory with millions of files (like a Maildir mail store or a bloated cache directory) can take many minutes. Use <code class=\"\" data-line=\"\">--max-depth<\/code> to limit recursion, and always add <code class=\"\" data-line=\"\">2&gt;\/dev\/null<\/code> to suppress permission errors that slow output. If you need something faster for a quick check, <code class=\"\" data-line=\"\">ncdu<\/code> is a great alternative \u2014 install it with <code class=\"\" data-line=\"\">apt install ncdu<\/code> or <code class=\"\" data-line=\"\">yum install ncdu<\/code> and it gives you an interactive, browsable view of disk usage.<\/p>\n<h3>Permission Denied Errors When Running du<\/h3>\n<p>You&#8217;re running <code class=\"\" data-line=\"\">du<\/code> as a non-root user and hitting directories you don&#8217;t own. Add <code class=\"\" data-line=\"\">sudo<\/code> before the command, or redirect stderr to suppress the noise: <code class=\"\" data-line=\"\">du -sh \/var\/* 2&gt;\/dev\/null<\/code>. If you&#8217;re on a shared hosting plan without SSH root access, your hosting control panel (cPanel, Plesk) has a built-in disk usage tool \u2014 check the &#8220;Disk Usage&#8221; section in the main dashboard.<\/p>\n<h3>Disk Fills Up Again Immediately After Clearing Space<\/h3>\n<p>Something is actively writing to disk at a high rate. The most common culprits on hosting servers are runaway PHP error logs, MySQL binary logs that aren&#8217;t being rotated, or an application stuck in an error loop generating log entries. To watch which files are growing in real time:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-13\"><code class=\"\" data-line=\"\">watch -n 5 &#039;du -sh \/var\/log\/* 2&gt;\/dev\/null | sort -rh | head -10&#039;<\/code><\/pre>\n<\/div>\n<p>This refreshes every 5 seconds and shows you the largest items in <code class=\"\" data-line=\"\">\/var\/log<\/code> \u2014 adjust the path to wherever you suspect the problem is.<\/p>\n<h2>Further Reading<\/h2>\n<p>If you&#8217;re consistently running low on disk space and your workload is growing, it may be time to look at upgrading your storage. Our <a href=\"https:\/\/www.hostandtech.com\/vps-ssd-servers\">VPS SSD Hosting<\/a> plans are built on NVMe SSD storage and include easy vertical scaling \u2014 you can increase disk allocation without migrating your server. Plans start from $5.83\/mo and are available across our North American, European, and Australian datacentres.<\/p>\n<div class=\"ht-faq-section\">\n<h2>Frequently Asked Questions<\/h2>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">What is the difference between df and du in Linux?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>df reports how full your mounted filesystems are \u2014 it reads data from the filesystem metadata and is very fast. du actually walks through directory trees and adds up file sizes. They measure slightly different things, which is why their numbers don&#8217;t always match exactly. Use df to spot a disk space problem, then use du to find where it&#8217;s coming from.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">How do I find which directory is using the most disk space on Linux?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>Run <code class=\"\" data-line=\"\">du -sh \/* 2&gt;\/dev\/null | sort -rh | head -20<\/code> from the root to get a top-level breakdown, then drill into whichever directory is largest. Repeating that process a few levels deep will pinpoint the problem directory in a couple of minutes. On cPanel servers, <code class=\"\" data-line=\"\">du -sh \/home\/*\/<\/code> gives you a quick per-account summary.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">Why does my Linux server say &#039;no space left on device&#039; when df shows free space?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>You&#8217;ve most likely run out of inodes, not raw disk space. Check with <code class=\"\" data-line=\"\">df -i<\/code> \u2014 if any partition shows IUse% at or near 100%, that&#8217;s your problem. It&#8217;s common on servers with lots of small files, like mail servers or WordPress sites with large cache directories. Clearing those small files will free up inodes.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">How do I check disk usage for a specific user on a cPanel server?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>Run <code class=\"\" data-line=\"\">du -sh \/home\/username\/<\/code> replacing <em>username<\/em> with the actual cPanel account name. For a breakdown of what&#8217;s inside that account, use <code class=\"\" data-line=\"\">du -sh \/home\/username\/* | sort -rh<\/code>. You can also see per-account disk usage in WHM under Account Information &gt; View Bandwidth Usage, or in cPanel itself under Files &gt; Disk Usage.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">Is it safe to delete files to free up disk space on a Linux server?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>It depends on what you&#8217;re deleting. Log files in <code class=\"\" data-line=\"\">\/var\/log<\/code> are generally safe to clear (truncate rather than delete if a service is running). Old backups, temporary files in <code class=\"\" data-line=\"\">\/tmp<\/code>, and application cache directories are usually safe too. Never delete files in <code class=\"\" data-line=\"\">\/bin<\/code>, <code class=\"\" data-line=\"\">\/lib<\/code>, <code class=\"\" data-line=\"\">\/usr<\/code>, or <code class=\"\" data-line=\"\">\/etc<\/code> without knowing exactly what they are \u2014 removing system files can make your server unbootable.<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Running out of disk space on a Linux server is one of those problems that causes cascading failures fast \u2014 MySQL crashes, emails bounce, WordPress throws errors. Here&#8217;s how to find what&#8217;s eating your disk and deal with it.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[49],"tags":[554,551,550,552,555,553,54,269],"class_list":["post-211","post","type-post","status-publish","format-standard","hentry","category-linux","tag-check-disk-usage-linux","tag-df-command","tag-disk-usage","tag-du-command","tag-how-to-check-disk-usage-on-linux-df-and-du-commands-explained","tag-linux-cli","tag-linux-server","tag-vps-storage"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Check Disk Usage on Linux: df and du Commands Explained<\/title>\n<meta name=\"description\" content=\"Learn how to check disk usage on Linux using the df and du commands. Practical examples for VPS and server users managing storage effectively.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hostandtech.com\/kb\/linux\/how-to-check-disk-usage-on-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Check Disk Usage on Linux: df and du Commands Explained\" \/>\n<meta property=\"og:description\" content=\"Learn how to check disk usage on Linux using the df and du commands. Practical examples for VPS and server users managing storage effectively.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hostandtech.com\/kb\/linux\/how-to-check-disk-usage-on-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Host And Tech knowledge base\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/stshostandtech\" \/>\n<meta property=\"article:published_time\" content=\"2026-06-03T06:01:18+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@stshostandtech\" \/>\n<meta name=\"twitter:site\" content=\"@stshostandtech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/how-to-check-disk-usage-on-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/how-to-check-disk-usage-on-linux\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/person\\\/b6fa79c48ddaba71af32e395c5b017ee\"},\"headline\":\"How to Check Disk Usage on Linux: df and du Commands Explained\",\"datePublished\":\"2026-06-03T06:01:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/how-to-check-disk-usage-on-linux\\\/\"},\"wordCount\":1661,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#organization\"},\"keywords\":[\"check disk usage Linux\",\"df command\",\"disk usage\",\"du command\",\"How to Check Disk Usage on Linux: df and du Commands Explained\",\"linux cli\",\"Linux server\",\"VPS storage\"],\"articleSection\":[\"Linux Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/how-to-check-disk-usage-on-linux\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/how-to-check-disk-usage-on-linux\\\/\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/how-to-check-disk-usage-on-linux\\\/\",\"name\":\"How to Check Disk Usage on Linux: df and du Commands Explained\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#website\"},\"datePublished\":\"2026-06-03T06:01:18+00:00\",\"description\":\"Learn how to check disk usage on Linux using the df and du commands. Practical examples for VPS and server users managing storage effectively.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/how-to-check-disk-usage-on-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/how-to-check-disk-usage-on-linux\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/how-to-check-disk-usage-on-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Check Disk Usage on Linux: df and du Commands Explained\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/\",\"name\":\"Host And Tech knowledge base\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#organization\",\"name\":\"Host And Tech knowledge base\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/logo-dark.png\",\"contentUrl\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/logo-dark.png\",\"width\":1134,\"height\":395,\"caption\":\"Host And Tech knowledge base\"},\"image\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/stshostandtech\",\"https:\\\/\\\/x.com\\\/stshostandtech\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/person\\\/b6fa79c48ddaba71af32e395c5b017ee\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\\\/\\\/hostandtech.com\\\/kb\"],\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/author\\\/admin_fjj7qydm\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Check Disk Usage on Linux: df and du Commands Explained","description":"Learn how to check disk usage on Linux using the df and du commands. Practical examples for VPS and server users managing storage effectively.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hostandtech.com\/kb\/linux\/how-to-check-disk-usage-on-linux\/","og_locale":"en_US","og_type":"article","og_title":"How to Check Disk Usage on Linux: df and du Commands Explained","og_description":"Learn how to check disk usage on Linux using the df and du commands. Practical examples for VPS and server users managing storage effectively.","og_url":"https:\/\/hostandtech.com\/kb\/linux\/how-to-check-disk-usage-on-linux\/","og_site_name":"Host And Tech knowledge base","article_publisher":"https:\/\/www.facebook.com\/stshostandtech","article_published_time":"2026-06-03T06:01:18+00:00","author":"admin","twitter_card":"summary_large_image","twitter_creator":"@stshostandtech","twitter_site":"@stshostandtech","twitter_misc":{"Written by":"admin","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hostandtech.com\/kb\/linux\/how-to-check-disk-usage-on-linux\/#article","isPartOf":{"@id":"https:\/\/hostandtech.com\/kb\/linux\/how-to-check-disk-usage-on-linux\/"},"author":{"name":"admin","@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/person\/b6fa79c48ddaba71af32e395c5b017ee"},"headline":"How to Check Disk Usage on Linux: df and du Commands Explained","datePublished":"2026-06-03T06:01:18+00:00","mainEntityOfPage":{"@id":"https:\/\/hostandtech.com\/kb\/linux\/how-to-check-disk-usage-on-linux\/"},"wordCount":1661,"commentCount":0,"publisher":{"@id":"https:\/\/hostandtech.com\/kb\/#organization"},"keywords":["check disk usage Linux","df command","disk usage","du command","How to Check Disk Usage on Linux: df and du Commands Explained","linux cli","Linux server","VPS storage"],"articleSection":["Linux Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/hostandtech.com\/kb\/linux\/how-to-check-disk-usage-on-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/hostandtech.com\/kb\/linux\/how-to-check-disk-usage-on-linux\/","url":"https:\/\/hostandtech.com\/kb\/linux\/how-to-check-disk-usage-on-linux\/","name":"How to Check Disk Usage on Linux: df and du Commands Explained","isPartOf":{"@id":"https:\/\/hostandtech.com\/kb\/#website"},"datePublished":"2026-06-03T06:01:18+00:00","description":"Learn how to check disk usage on Linux using the df and du commands. Practical examples for VPS and server users managing storage effectively.","breadcrumb":{"@id":"https:\/\/hostandtech.com\/kb\/linux\/how-to-check-disk-usage-on-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hostandtech.com\/kb\/linux\/how-to-check-disk-usage-on-linux\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/hostandtech.com\/kb\/linux\/how-to-check-disk-usage-on-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hostandtech.com\/kb\/"},{"@type":"ListItem","position":2,"name":"How to Check Disk Usage on Linux: df and du Commands Explained"}]},{"@type":"WebSite","@id":"https:\/\/hostandtech.com\/kb\/#website","url":"https:\/\/hostandtech.com\/kb\/","name":"Host And Tech knowledge base","description":"","publisher":{"@id":"https:\/\/hostandtech.com\/kb\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hostandtech.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/hostandtech.com\/kb\/#organization","name":"Host And Tech knowledge base","url":"https:\/\/hostandtech.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/hostandtech.com\/kb\/wp-content\/uploads\/2026\/05\/logo-dark.png","contentUrl":"https:\/\/hostandtech.com\/kb\/wp-content\/uploads\/2026\/05\/logo-dark.png","width":1134,"height":395,"caption":"Host And Tech knowledge base"},"image":{"@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/stshostandtech","https:\/\/x.com\/stshostandtech"]},{"@type":"Person","@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/person\/b6fa79c48ddaba71af32e395c5b017ee","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/hostandtech.com\/kb"],"url":"https:\/\/hostandtech.com\/kb\/author\/admin_fjj7qydm\/"}]}},"_links":{"self":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/posts\/211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/comments?post=211"}],"version-history":[{"count":0,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/posts\/211\/revisions"}],"wp:attachment":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/media?parent=211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/categories?post=211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/tags?post=211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}