Sobes.tech
Junior

How to find free disk space via console in Linux?

sobes.tech AI

Answer from AI

Two main commands: df and du.

df (disk free) shows information about used and free space on mounted filesystems.

df -h   // Show information in a human-readable format (bytes, kilobytes, megabytes, gigabytes)

du (disk usage) estimates the space used by specific files or directories.

du -sh /path/to/directory  // Show total size of the specified directory in a human-readable format