5 Essential Linux Commands to Monitor Disk Space and Free Up Storage
Learn how to quickly check available disk space on Linux servers using five built‑in commands—df, du, ls, stat, and fdisk—plus handy GUI tools, with practical options and examples to help you clean up storage efficiently.
df command
The df (disk‑free) command shows used and available disk space on a Linux system. Common options include: df -h: display sizes in a human‑readable format (e.g., MB, GB) instead of raw bytes. df -a: include all filesystems, even those with zero blocks. df -T: show the filesystem type for each mount point (e.g., ext4, xfs, btrfs). df -i: display inode usage (used and free inodes).
If you prefer a graphical interface, the GNOME Disks utility (gnome‑disk‑utility) can display the same information.
du command
The du (disk usage) command reports the size of files and directories, defaulting to kilobytes. Useful options are: du -h: human‑readable output for all directories and sub‑directories. du -a: include every file in the size report. du -s: show only the total size for each argument.
Graphical alternatives include GNOME’s Disk Usage and KDE’s Filelight, which visualize usage as concentric rings.
ls -al command
The familiar ls command, with the -al flags, lists all entries in a directory, showing permissions, owners, sizes, and timestamps.
stat command
The stat command takes a file or directory as an argument and displays detailed statistics, including size, inode number, permissions, and timestamps.
fdisk -l command
The fdisk -l command lists disk sizes and partition tables, useful for understanding the layout of storage devices.
All of these commands are built‑in to Linux and require no extra installation. Third‑party tools such as Disks and Ncdu provide visual representations of disk usage for those who prefer a GUI.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
