What is df in linux
Last updated: April 1, 2026
Key Facts
- The df command works on all Linux distributions and Unix-like systems, making it a universal standard for querying disk space information
- Default output shows disk usage in 1024-byte blocks; the -h flag converts this to human-readable units like KB, MB, and GB for easier interpretation
- df queries the kernel's filesystem information in real-time, providing an accurate current snapshot of disk usage across all mounted filesystems
- The command supports various options like -T (show filesystem type), -i (show inode usage), and -l (show local filesystems only) for different monitoring needs
- df is essential for system administration, monitoring scripts, automated alerts, and troubleshooting disk space-related issues before they cause problems
Overview of the df Command
The df command, short for "disk free," is one of the most fundamental utilities in Linux and Unix system administration. It provides a comprehensive overview of disk space utilization across all mounted filesystems, making it essential for monitoring storage capacity, diagnosing disk space problems, and planning infrastructure upgrades. Whether you're managing a personal computer or a large-scale server infrastructure, df is typically one of the first commands administrators use to assess disk health.
Basic Usage and Output
Running the simple command df in a terminal displays a table with information about all mounted filesystems. Each row represents a different partition or logical volume, showing the device path, total size, used space, available space, usage percentage, and mount point. By default, sizes are displayed in 1024-byte blocks, which results in large numbers that aren't intuitive for humans. For this reason, most administrators use the -h flag to display sizes in human-readable format: df -h.
Understanding the Columns
The standard df output contains several important columns. The Filesystem column shows the device file or logical volume name. The Size column displays total capacity, while Used shows space currently occupied by files and data. The Available column indicates free space accessible to regular users, which may differ from total free space due to reserved space for the root user. The Use% percentage helps quickly identify nearly-full partitions, and Mounted on shows where each filesystem is attached in the directory structure.
Advanced Options and Variations
The df command supports numerous options for different situations. The -T option adds a column showing the filesystem type (ext4, NTFS, XFS, btrfs, etc.), helpful for understanding your storage infrastructure. The -i flag switches the display to show inode usage instead of disk space, useful when troubleshooting issues where inodes are exhausted despite having disk space available. The -l option restricts output to local filesystems, excluding remote NFS or Samba mounts, which is useful in network environments. Options can be combined, such as df -hT to show both human-readable sizes and filesystem types.
Practical System Administration Applications
System administrators use df in multiple contexts. Regular manual checks help identify when storage upgrades are needed, typically when usage approaches 80-90% capacity. More importantly, df is incorporated into monitoring scripts and cron jobs that automatically track disk usage over time and alert administrators when thresholds are exceeded. Shell scripts can parse df output to implement automated cleanup procedures, archive old files, or trigger escalation procedures when critical disk space levels are reached.
Comparison with Related Commands
While df shows filesystem-level disk usage, the du command provides a complementary view by showing space consumed by specific directories and files. Together, these tools help administrators understand both overall filesystem health and where disk space is actually being consumed. The ncdu tool offers an interactive visualization of directory sizes, and modern tools like dfc provide colorized output, but df remains the universal standard across all Unix-like systems.
Related Questions
What is the du command in Linux?
The du (disk usage) command shows space consumed by specific directories and files, complementing df which shows filesystem-level usage. Together they provide complete disk usage visibility.
How do I find large files in Linux?
Use find combined with file size options, or du to identify space-consuming directories, then ls -lah to examine specific large files consuming storage.
What does the 'Avail' column mean in df output?
The Available column shows free space accessible to regular users, which may be less than total free space because some space is reserved exclusively for the root user.
More What Is in Daily Life
- What Is a Credit ScoreA credit score is a three-digit number, typically ranging from 300 to 850, that represents your cred…
- What Is CD rates make no sense based on length of time invested. Explain like I'm 5CD (Certificate of Deposit) rates often don't increase with longer lock-up times the way people expe…
- What is a phdA PhD (Doctor of Philosophy) is a doctoral degree earned after completing advanced academic research…
- What is a polymathA polymath is a person with deep knowledge and expertise across multiple different fields or academi…
- What is aarch64ARMv8-A (commonly called ARM64 or AArch64) is a 64-bit processor architecture developed by ARM Holdi…
- What is aaaAAA batteries are a standard cylindrical battery size measuring 10.5mm in diameter and 44.5mm in len…
- What is aacAAC (Advanced Audio Codec) is a digital audio compression format that provides better sound quality …
- What is aaa gameAAA games are high-budget video games developed by large studios with budgets typically exceeding $1…
- What is a proxyA proxy is a server that acts as an intermediary between your device and the internet, forwarding yo…
- What is agoraphobiaAgoraphobia is an anxiety disorder characterized by intense fear of situations where escape might be…
- What is a jockA jock is an athlete, especially in high school or college, known for participation in sports. The t…
- What is a jesterA jester is a professional entertainer employed by royalty or nobility to provide humor, satire, and…
- What is a juxtapositionJuxtaposition is a literary and rhetorical technique of placing two contrasting things side by side …
- What is a juggernautA juggernaut is an unstoppable or overwhelming force, power, or person that crushes all opposition. …
- What is a jointA joint is an anatomical structure where two or more bones meet and connect, allowing movement and f…
- What is a jewA Jew is a person who practices Judaism, is of Jewish descent, or identifies with Jewish culture, et…
- What is a joint ventureA joint venture is a business agreement where two or more companies collaborate on a specific projec…
- What is ambienAmbien is a prescription sedative medication containing zolpidem, used to treat insomnia by helping …
- What is amortizationAmortization is the process of paying off a loan through regular installment payments over a fixed p…
- What is amishThe Amish are a Christian religious group known for their plain lifestyle, limited use of modern tec…
Also in Daily Life
- How To Save Money
- Why are so many white supremacist and right wings grifters not white
- Does "I'm 20 out" mean youre 20 minutes away from where you left, or youre 20 minutes away from your destination
- Why are so many men convinced that they are ugly
- What does awol mean
- What does asl mean
- What does ad mean
- What does asap mean
- What does apex mean
- What does asmr stand for
- What does atp mean
- What causes autism
- What does abg mean
- What does am and pm mean
- What does a fox sound like