After using Windows, working on Linux can be a bit intimidating, 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. All that you need to do is:
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.”
OR
You can just press Alt+F2 from the keyboard and type in “gnome-terminal” and hit enter.
Now in the terminal, I recommend you to go the top of the file system hierarchy, i.e. /.
~]# cd /
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.
If you want to learn more about the “df” command, just enter the following commands:

~]# whatis df
~]# man df
~]# df –help
~]# info df