df
The command that reports total, used and free space for each mounted filesystem.
In more detail
-h prints sizes in readable units such as G for gigabytes. df / shows only the filesystem holding the root directory.
Examples
df -h /df -h shows sizes in readable units and df -i shows inode usage, the two separate ways a filesystem can fill. It works from filesystem totals, so it includes space held by deleted but still-open files. Use it first to find which mount and which resource is exhausted.mount=/ usage=82% inodes=41% state=healthy records both resources for one mount.Related terms
- du — The command that adds up how much disk space a directory and everything below it uses.
- filesystem — The way an operating system organises files and folders on a disk or in memory.
- mount point — The directory where a filesystem is attached into the single directory tree.
- block exhaustion — A filesystem running out of free data blocks, so it cannot store more bytes even though it may have inodes left.
- inode exhaustion — A filesystem running out of inodes, so no new files can be created even though free space remains.
Taught in
- Scheduling, Monitoring And A Script That Reports — Bash Scripting & Command Line Automation
- Running Out Of Space: df, du And Inodes — Linux Fundamentals & Systems Administration
- Extend A Logical Volume And Its File System — Red Hat Certified System Administrator (EX200) Exam Prep
- Three Names, One Image: Listing, Formatting, Tagging And Pruning — Docker Certified Associate (DCA) Exam Prep
- Images Sprint: Eight Questions On Builds, Tags And Registries — Docker Certified Associate (DCA) Exam Prep
- Orders That Vanished: Volumes, Shared Storage And Cleanup — Docker Certified Associate (DCA) Exam Prep
- Storage Sprint: Eight Questions On Layers, Drivers And Volumes — Docker Certified Associate (DCA) Exam Prep
- Friday, Nine In The Morning: The Mock Exam And Its Report — Docker Certified Associate (DCA) Exam Prep
- The Pager Goes Off At 2 A.M.: A Three-Question Triage — CompTIA Linux+ (XK0-006) Exam Prep
- No Space For Tonight's Scans: Partitions And LVM On Both Families — CompTIA Linux+ (XK0-006) Exam Prep
- Which RAID, Which File System? Disks That Fail And Inodes That Run Out — CompTIA Linux+ (XK0-006) Exam Prep
- You Are In Emergency Mode: Boot Failures From GRUB To fstab, On Both Families — CompTIA Linux+ (XK0-006) Exam Prep
- No Space Left, Says The Disk With Room To Spare: Inodes, Held Files, Corruption And Repair — CompTIA Linux+ (XK0-006) Exam Prep
- Ninety Minutes, Five Domains: The Full Mock And The Week Before The Exam — CompTIA Linux+ (XK0-006) Exam Prep
- LVM End To End: Pools, Volumes And Online Growth — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- The Virtual File System: /proc, /sys, Binds And tmpfs — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- File Systems: Create, Label, Mount And Repair — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Storage Performance: Busy, Slow, Or Both — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Disk Full At Three In The Morning — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Drill: From Emergency Mode To A Clean Boot — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Mock Exam, Part 1: Seventeen Tasks, One Reboot — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- File System Integrity: Measure, Check, Repair — LPIC-1 Linux Administrator (101-500 and 102-500) Exam Prep
References
Certification courses
- RHCSA course and practice exam: Red Hat Certified System Administrator (EX200)
- DCA course and practice exam: Docker Certified Associate
- CompTIA Linux+ course and practice exam: XK0-006
- LFCS course and practice exam: Linux Foundation Certified System Administrator
- LPIC-1 course and practice exam: Linux Administrator (101-500 and 102-500)