How do I check the disk space usage on Ubuntu?

In Ubuntu, you can use the following command to check how disk space is being utilized:

  1. Check the usage of all disk partitions using the df command.
df -h
  1. Check the disk space usage of a specified directory or folder using the “du” command.
du -h /path/to/directory

With the above two commands, you can easily view the usage of disk space and identify which files or directories are taking up a large amount of disk space.

bannerAds