Linux: How to View Disk Space?


After using Windows, working on Linux can seem to be a bit harder, you know, typing those commands in the terminal can be a headache for many.

Let’s say, you have been working in Linux for some time and have been creating and importing files, but now, you need to check if you have enough disk space for another file. How do you do that? How do you view the disk space in Linux?

Well, it’s pretty easy mates. All that you need to do is:

  1. Open the terminal.
    Don’t know how to do that?
    It’s super easy. Right click on the Desktop background and click on “Open in Terminal.”
    You can just press Alt+F2 from the keyboard and type in “gnome-terminal” and hit enter.
  2. Now in the terminal, I recommend you to go the top of the file system hierarchy, i.e. /.
    ~]# cd /
  3. Enter the commands as per your requirement of the output:
    ~]# df
    Gives general disk space information.
    ~]# df –h
    Gives general disk space information in human readable form.
    ~]# df –a
    Gives disk space information of all the files or directories.
    ~]# df –m
    Gives disk space information in MB.
    ~]# df –T
    Gives disk space information along with the type of the files.
  4. If you want to learn more about the “df” command, just enter the following commands:
    ~]# whatis df
    ~]# man df
    ~]# df –help
    ~]# info df

That’s all for now, if you guys have any queries, feel free to mention them in the comment section below.

Published by Abhinav Gyawali

Hello there! I'm a teenager, who spends most of his day thinking and analyzing things. I'm full of ideas and creativity! Hence, I realized a blog would be perfect for me to share my ideas!

Leave a comment

Your email address will not be published. Required fields are marked *

%d bloggers like this: