Checking disk space is a crucial task for any system administrator. It helps to ensure that there is enough free space to run programs and store data, and to identify potential problems before they cause serious issues. In CentOS, there are several commands that can be used to check disk space, each with its own advantages and disadvantages.
One of the most common commands for checking disk space is `df`. This command provides a summary of the available disk space on all mounted file systems. The output of `df` includes the total size of the file system, the amount of used space, the amount of free space, and the percentage of used space. For example, the following output shows that the root file system has a total size of 20GB, with 10GB used and 10GB free: