To check free disk space instantly, use built-in commands or tools available on every modern operating system. You’ll see exact storage remaining on your drives—perfect for cleaning storage, setting up backups, or troubleshooting slow performance. No extra software required, just run the right command in your terminal or command prompt.
What You'll Need
- Your operating system’s default terminal, command prompt (Windows), or File Explorer.
- A basic understanding of how to open text files or run searches (basic keyboard shortcuts are fine).
- If you’re unsure which command works on your system, try both the most common options listed below.
Step-by-Step
-
Windows:
- Press
Win + Rto open the Run dialog, typecmd, and hit Enter to open Command Prompt. - Type the following command and press Enter:
df -h(This command shows disk space in human-readable format. If you don’t have it installed, rundf --helpin PowerShell or install it viawinget install dfin Command Prompt.) - Alternatively, for a quicker view of available space on your primary drive, use:
dir C: /s /b(replaceC:with your drive letter if needed). This lists files, but the output includes free space in parentheses.
- Press
-
macOS:
- Open Terminal (search for it in Spotlight or Applications).
- Type:
df -h(This shows disk usage across all mounted drives in a clean format.) - For a detailed breakdown of each partition, add:
--total(e.g.,df -h --total).
-
Linux:
- Open a terminal (search for it or use
Alt + F2on most distros). - Run:
df -h(This is the standard command for human-readable disk usage.) - If you want only a summary, use:
df -T(Shows filesystem type for each drive.)
- Open a terminal (search for it or use
-
For File Explorer (Windows) or Finder (macOS):
- Open File Explorer (
Win + Eon Windows) or Finder. - Right-click any drive (e.g., C:, E:) and select Properties.
- For macOS, click the drive’s name in the sidebar, then Info.
- Look for the Disk Space Used or Free Space section.
- Open File Explorer (
Common Mistakes
- Using the wrong command: On Linux/macOS,
lsordirlists files but doesn’t show free space. Always usedfordf -h. - Ignoring drive letters: In Windows’
dir C:/s /b, replaceC:with your actual drive (e.g.,D:for an external drive). - Not checking entires drives:
df -hlists all mounted drives. To filter, exclude filesystems liketmpfs(memory) orcdrom(CD-ROM). Add--exclude tmpfsif needed. - Windows PowerShell quirks: If you use PowerShell, try
Get-PSDriveto see mounted drives before runningdf.
Tips
- Quick summary: On Linux/macOS, add
--totaltodf -hto see a grand total of free space. - External drives: Connect an external HDD/SSD first, then run
df -hto see its free space. - Windows: Use
dufor folders: In Command Prompt, navigate to a folder and rundu -sh *to check its size (human-readable). - macOS: Check a single partition: Open Disk Utility (Applications > Utilities), select your drive, then click First Aid to see detailed stats.
- Cloud storage: For iCloud, OneDrive, or Google Drive, use their official apps or web interfaces (e.g., click Storage in the OneDrive app).
- Free space ≠ available space: Some filesystems (like NTFS in Windows) reserve space for future growth. Use
diskpart(Windows) ortune2fs(Linux) to adjust if needed.
Troubleshooting
If the command fails or shows no results, try these fixes:
-
Command not found:
dfis part of the GNU coreutils package. Install it via:- Windows: Use
winget install dfor install Git for Linux/macOS. - macOS/Linux: Run
sudo apt update && sudo apt install df(Debian/Ubuntu) orsudo pacman -S coreutils(Arch).
- Windows: Use
-
No output from
df: This usually means no drives are mounted or the system is in read-only mode. Check if your drive is accessible in File Explorer (Windows) or Finder (macOS), then retry. -
Slow performance: If commands take forever, your system may be low on RAM or swapping to disk. Close unnecessary apps or check RAM usage with
top(Linux/macOS) or Task Manager (Windows). -
Permission denied: Run
df -has admin (Windows) or withsudo(Linux/macOS). For example:sudo df -h(Type your password when prompted.) -
Virtual machines or containers: Use
df -hinside the VM, but note that shared storage may not reflect the full space of the host.
Frequently Asked Questions
Why does df show "no space left"?
This can happen if:
- The filesystem is in error (try
fsckon Linux/macOS). - You’re running out of space due to large temporary files or cache.
- The drive is corrupted or the filesystem is read-only. Check in Disk Utility (macOS) or File Explorer (Windows).
How do I see free space on a specific folder?
Use:
- Windows: Run
dir "C:\YourFolder" /s /b(replace with your folder path). - macOS/Linux: Use
du -sh "/path/to/folder"(replace with your folder).
Can I check free space on a network drive?
Yes, but the method depends on the protocol:
- SMB (Windows): Use
df -h(Linux/macOS) or check the drive in File Explorer. - NFS (Linux/macOS): Same as local drives. For CIFS/SMB, ensure permissions allow access.
How do I reset free space statistics?
Free space is dynamic, so it recalculates when you:
- Add or remove files.
- Run
dfor a disk utility tool. - Restart your computer.
Will df work in a Docker container?
Yes, but:
- It shows space in the container’s filesystem, not the host’s.
- Use
docker exec -it container_name bashto access the container’s terminal.
How can I see free space for cloud storage like iCloud?
Use the official apps:
- macOS/iOS: Open iCloud, click the storage icon, then Manage Storage.
- Windows: Check OneDrive > Settings > Storage > Manage Storage.