How To Quickly Check Disk Usage in Linux with df -h

How To Quickly Check Disk Usage in Linux with df -h

Who This Is For (And The Panic You’re In)

You’ve got a Linux box (maybe a VPS running WordPress, a small business server, or a home lab machine) and something suddenly complains about “No space left on device”.
Or you just want to know: how full are my disks really?

This is super common if you manage servers, run WooCommerce, or host multiple sites on a small VPS.
Before touching anything scary like deleting logs or moving databases, you need one simple thing: a clear view of disk usage.

In this guide, I’ll walk you through the basic, practical use of the df command to check your disk capacity and usage, plus how to filter out the noisy stuff like tmpfs.
Short, hands-on, and focused.

Before You Start: Safe Mindset

We’re only going to read information in this guide, not change any data.
So it’s safe to run these commands even on a production server.

Still, a few good habits:

  • Use SSH with a normal user (not root) when possible.
  • Add sudo only if the command complains about permission.
  • Don’t delete anything yet just because it “looks big”. First, understand what you’re seeing.

If your storage device is brand new and not even formatted or partitioned, that’s a different problem.
This guide assumes your disks are already set up and mounted.

Step 1: Check Disk Usage with df -h

The main tool here is df.
It shows how much space is used and available on your mounted filesystems.

Run this first:

df -h

The -h flag means “human-readable” — so instead of raw 1K blocks, you get sizes like 20G or 245M.
That’s much easier to read when you’re half awake at 2AM fixing a server.

You’ll see output similar to this:

Filesystem      Size  Used Avail Use% Mounted on
udev            238M     0  238M   0% /dev
tmpfs            49M  624K   49M   2% /run
/dev/vda1        20G  1.1G   18G   6% /
tmpfs           245M     0  245M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           245M     0  245M   0% /sys/fs/cgroup
tmpfs            49M     0   49M   0% /run/user/1000
/dev/sda1        99G   60M   94G   1% /mnt/data

That’s a lot of lines for one simple question: “How full is my disk?”
Let’s break it down.

Step 2: Understand the df Output Columns

Each line in that output is one filesystem.
You care mostly about the real block devices, usually things like /dev/sda1, /dev/vda1, etc.

Quick summary of the columns:

  • Filesystem – The device or pseudo-device providing this storage. Real disks look like /dev/vda1 or /dev/sda1.
  • Size – Total capacity of that filesystem.
  • Used – How much space is currently used.
  • Avail – How much space is available for use.
  • Use% – Percentage of the filesystem that’s used. This is the “am I in trouble yet?” column.
  • Mounted on – The directory where this filesystem is attached in your Linux tree.

From our example:

/dev/vda1        20G  1.1G   18G   6% /
/dev/sda1        99G   60M   94G   1% /mnt/data
  • /dev/vda1 is mounted at / and is 6% full, with 18G free.
  • /dev/sda1 is mounted at /mnt/data and is basically empty, with 94G free.

If you see something like / at 95–100% in Use%, that’s why things are breaking.
At that point, installs, updates, and even basic services can fail.

Step 3: Ignore the Noisy tmpfs/devtmpfs Entries

You’ll notice a bunch of entries like tmpfs and udev in the output.
These use memory (RAM) presented as if it were storage.
They’re important for the system, but not the same as your actual disks.

From the earlier output:

udev            238M     0  238M   0% /dev
tmpfs            49M  624K   49M   2% /run
...
tmpfs           245M     0  245M   0% /dev/shm

If you’re just trying to see “how full are my drives?”, these lines are noise.
Luckily, df lets you filter them out.

Run this instead:

df -h -x tmpfs -x devtmpfs

This tells df: show everything in human-readable units, but exclude filesystems of type tmpfs and devtmpfs.
The result is much cleaner to read.

You’ll get something like this:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        20G  1.1G   18G   6% /
/dev/sda1        99G   60M   94G   1% /mnt/data

Now it’s obvious:
– Your root filesystem (/) has 18G free.
– Your data disk (/mnt/data) has 94G free.

When you’re under pressure, this trimmed view saves you from scanning through a wall of tmpfs entries.

Step 4: Focus on the Mount Points That Matter

On a typical small business or WordPress server, you’ll usually care about:

  • / – The root filesystem. If this fills up, everything hurts.
  • /home – User data. Some setups put user data here on a separate partition.
  • /mnt/... or /data – Extra disks for uploads, backups, or databases.

Use this command to see a focused, readable list:

df -h -x tmpfs -x devtmpfs

Then look at:

  • The Use% column for anything above ~80–90%.
  • The Mounted on path where your heavy stuff lives (like website files or backups).

From the trimmed output:

/dev/vda1        20G  1.1G   18G   6% /
/dev/sda1        99G   60M   94G   1% /mnt/data

You now know:

  • The system disk (/) is healthy with plenty of free space.
  • The extra data disk (/mnt/data) is almost empty and ready for use.

If one of these was at 95–100%, that’s where you’d start investigating which files or directories are eating space.

Step 5: Common Mistakes to Avoid When Reading df

When you’re new (or just tired), it’s easy to misread df and chase the wrong problem.
Here are a few gotchas.

1. Confusing tmpfs with real disks

Entries like this:

tmpfs           245M     0  245M   0% /dev/shm

are memory-based.
They’re not your real storage disks.
If they look full or small, that’s normal — don’t delete files from them blindly.

That’s exactly why filtering with:

df -h -x tmpfs -x devtmpfs

is so helpful.

2. Only looking at Size, ignoring Use%

A 20G disk with 1G used is fine.
A 20G disk with 19G used is not.
The Use% column gives you the quick health view.

3. Forgetting about extra disks

Many servers have more than one disk or partition.
For example:

/dev/vda1        20G  1.1G   18G   6% /
/dev/sda1        99G   60M   94G   1% /mnt/data

You might be low on root (/) while /mnt/data is nearly empty.
Knowing this helps you decide where to move big files or which partition to use for heavy storage.

Step 6: Simple Routine You Can Use on Any Server

Here’s a quick habit you can reuse across all your Linux boxes.
Whenever something feels “disky” (updates failing, logs huge, backups choking), run this sequence:

  1. Check everything in human-readable form
    bash
    df -h
  2. Filter out tmpfs and devtmpfs for a clean view
    bash
    df -h -x tmpfs -x devtmpfs
  3. Scan the Use% column
  4. Anything above ~80–90% deserves attention.
  5. Anything at or near 100% is an emergency.
  6. Identify the mount point
  7. Look at Mounted on to see where that filesystem lives.
  8. Example: /, /mnt/data, etc.

This alone doesn’t fix the full disk, but it tells you exactly where the problem is.
From there, you can decide what to clean, move, or resize (on a separate plan, with backups!).

Quick Recap and Next Step

We used df -h to quickly see disk capacity and usage in human-readable units.
Then we used df -h -x tmpfs -x devtmpfs to hide memory-based filesystems and focus on real disks like /dev/vda1 and /dev/sda1.

You now know how to:

  • Read the key df columns (Size, Used, Avail, Use%, Mounted on).
  • Ignore noisy tmpfs/devtmpfs entries.
  • Quickly spot which filesystem is actually in trouble.

From here, your next step is to track down which folders or files eat that space, but that’s another story.

Need more help? Check the latest CrushEdge posts.

No Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.