author
Richard (Senior Manager) 2025-05-12 20:30:58
Answered

How to check disk space in Linux?

I’m running Linux on my system and need to quickly check my available disk space. What commands or methods can I use to clearly see disk usage?

author
Richard (Senior Manager) 2025-05-12 20:30:58
read time 2 Minute
comment count 0 Comments
How to check disk space in Linux?

I ran into this the other day, I needed to check how much space was left on my Linux VPS system, and here’s what worked for me.

View Linux Disk Usage with the df -h Command

First, I used this:

df -h

It shows your drives, how big they are, how much is used, and what’s still free. You’ll get something like:

FS         Size  Used  Free  Use%  Mount

/dev/sdb1        80G   55G   21G  70% /

Pretty handy.

Want to dig deeper? The Linux manual for df explains all the options in detail.

Then, I wanted to see how much space a specific folder was taking up. For that, this command did the trick:

du -sh /var/log

Run a Disk Space Command to Check Folder Size

Mine showed:

2.4G    /var/log

So yeah, 2.4 gigs just for log files. Not bad, but good to know.

Hope that helps. If you’re running out of space, these two commands are lifesavers.

If you have any questions, ask.
How useful was this post for you?
0 Points from 0 Vote

📪 Post a comment

First and last name1
Email address
Message text
Your rating (optional)

Calculate: 7 - 4 :

💬 Recent responses

No one found!