Determining the size of a hard disk drive (HDD) is a fundamental task in Linux systems, whether for system monitoring, storage management, or troubleshooting purposes. Understanding the HDD size provides valuable insights into the system’s storage capacity and helps in planning for data storage and backup strategies. There are several methods to check the HDD size in Linux, each with its advantages and use cases.
One of the most straightforward methods is to use the ‘df’ command, which provides information about the disk usage of the file systems mounted on the system. By invoking ‘df -h’ in the terminal, users can obtain a human-readable output that displays the total size, used space, and available space of each mounted file system. This method is particularly useful for getting a quick overview of the disk space utilization across different partitions and file systems.