How to check the hard disk memory size on Linux?
In Linux system, you can use the following command to view the size of the hard drive and memory:
- Check the size of the hard drive:
- The command df -h can be used to display all mounted file systems along with their usage. The “Size” column shows the total size of the disk.
- The lsblk command can be used to display all block devices in the system, including hard drives and partitions. The “SIZE” column shows the total size of the hard drive.
- Check the memory size.
- The command “free -h” can display the memory usage of the system. The “total” column shows the total size of the memory.
- The command “cat /proc/meminfo | grep MemTotal” can be used to check the total size of memory.
Please note that these commands need to be run with admin privileges or using the sudo command to gain permission.