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

  1. Windows:
    1. Press Win + R to open the Run dialog, type cmd, and hit Enter to open Command Prompt.
    2. 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, run df --help in PowerShell or install it via winget install df in Command Prompt.)
    3. Alternatively, for a quicker view of available space on your primary drive, use: dir C: /s /b (replace C: with your drive letter if needed). This lists files, but the output includes free space in parentheses.
  2. macOS:
    1. Open Terminal (search for it in Spotlight or Applications).
    2. Type: df -h (This shows disk usage across all mounted drives in a clean format.)
    3. For a detailed breakdown of each partition, add: --total (e.g., df -h --total).
  3. Linux:
    1. Open a terminal (search for it or use Alt + F2 on most distros).
    2. Run: df -h (This is the standard command for human-readable disk usage.)
    3. If you want only a summary, use: df -T (Shows filesystem type for each drive.)
  4. For File Explorer (Windows) or Finder (macOS):
    1. Open File Explorer (Win + E on Windows) or Finder.
    2. Right-click any drive (e.g., C:, E:) and select Properties.
    3. For macOS, click the drive’s name in the sidebar, then Info.
    4. Look for the Disk Space Used or Free Space section.

Common Mistakes

  • Using the wrong command: On Linux/macOS, ls or dir lists files but doesn’t show free space. Always use df or df -h.
  • Ignoring drive letters: In Windows’ dir C:/s /b, replace C: with your actual drive (e.g., D: for an external drive).
  • Not checking entires drives: df -h lists all mounted drives. To filter, exclude filesystems like tmpfs (memory) or cdrom (CD-ROM). Add --exclude tmpfs if needed.
  • Windows PowerShell quirks: If you use PowerShell, try Get-PSDrive to see mounted drives before running df.

Tips

  • Quick summary: On Linux/macOS, add --total to df -h to see a grand total of free space.
  • External drives: Connect an external HDD/SSD first, then run df -h to see its free space.
  • Windows: Use du for folders: In Command Prompt, navigate to a folder and run du -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) or tune2fs (Linux) to adjust if needed.

Troubleshooting

If the command fails or shows no results, try these fixes:

  • Command not found: df is part of the GNU coreutils package. Install it via:
    • Windows: Use winget install df or install Git for Linux/macOS.
    • macOS/Linux: Run sudo apt update && sudo apt install df (Debian/Ubuntu) or sudo pacman -S coreutils (Arch).
  • 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 -h as admin (Windows) or with sudo (Linux/macOS). For example: sudo df -h (Type your password when prompted.)
  • Virtual machines or containers: Use df -h inside 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 fsck on 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 df or 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 bash to 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.