Share your love
Easy Steps To Display Disk Space on AlmaLinux 8/9

This article intends to teach you to Check or Display Disk Space on AlmaLinux 8/9. The Linux operating system can seem a bit technical but generally offers greater control to users. Managing disk space on Linux servers is an incredibly important task; if you run out of space on a server, your websites can crash.
There are many ways by which we can check the Linux system disk space. You can use a third-party app that displays the available disk space. Another way is the command line by the Linux Terminal, some of which are df and du, where du means disk space used and df means disk space free. Follow the steps below on the Orcacore website to complete this guide.
Table of Contents
Steps To Display Disk Space on AlmaLinux
To Check disk space Linux, you must log in to your server as a root or non-root user with sudo privileges. You can visit these Initials Guides on AlmaLinux:
Initial Server Setup with AlmaLinux 9
Initial Server Setup with AlmaLinux 8
Check Disk Space Linux with df Command on AlmaLinux
The df command displays the amount of disk space available on the filesystem with each file name’s argument.
You can simply use the command below:
df
You will get something similar to this:

If you want to check disk space usage in human-readable format, use the -h option:
df -h

Check File System Type on AlmaLinux
At this point, you can easily use the df command with the -T option to display the file system type:
df -T

To display the information about the ext4 partition, run the following command:
df -t ext4

ext4 is the default file system for many Linux distributions.
Check Disk Space Linux with du command on AlmaLinux
The du (disk usage) command measures the disk space occupied by files or directories.
To display the disk space usage of your current directory, you can use the command below:
du
Output
32 .
And, to display the information in human-readable format, run the following command on AlmaLinux:
du -h
Output
32K .
To display the total disk space usage of the specified directory, you can use the -hs option:
du -hs /var/log
Output
4.5M /var/log
Also, you can use the du command with the sort parameter to sort the files and directories by size:
du -h | sort -rn
Output
32K .
Conclusion
As said above, Managing disk space on Linux servers is an incredibly important task; if you run out of space on a server, your websites can crash. At this point, you have learned to Display or Check Disk Space on AlmaLinux.
Hope you enjoy it. You may also like these articles: