author avatar
Question
2025/05/12
check mark icon 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?

user avatar
2 Min
Answer

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, you can ask
0 out of 0 votes
Leave a Reply

Full Name*
Email*
Comment *

Calculate the value of 6 + 8 :

Save my name, email, and website in this browser for the next time I comment.
Recent Replies
Show More

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day