How to view the total size of a server’s hard disk on Linux?
You can use the following command to check the total size of the hard drive on a Linux server:
- “df” needs to be paraphrased in English.
df -h
This command will display the size of the file system in a human-readable format, including total size, used space, available space, and mount point.
- List block devices
lsblk -d
This command will display information about the hard drive in a concise table format, including the device name, hard drive size, and device type.
- feline
- information about partitions
cat /proc/partitions
This command will display information about the partitions on the hard drive, including device name, number of partitions, and size.
The above commands can be used based on specific needs, combining different commands to obtain more detailed information about the hard drive.