How do you check disk usage in Linux?

Answer

Use df (disk free) and du (disk usage). df -h shows overall disk space usage for all mounted filesystems in human-readable form (GB/MB). df -hT also shows filesystem type. du -sh /path shows total size of a directory. du -sh * shows sizes of all items in the current directory. du -h --max-depth=1 /var gives a summary one level deep. For a visual overview, tools like ncdu (interactive) are very helpful. High disk usage on /var/log is a common production issue.