Show Hard Disk Size Linux

Sep 2023

Overview

Just a quick note on how to show the entire disk size in Linux, rather than just the partitions.

fdisk -l | grep '^Disk'

fdisk -l | grep '^Disk'
Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 850
Disklabel type: dos
Disk identifier: 0x1f26beb5
Disk /dev/mapper/almalinux-root: 70 GiB, 75161927680 bytes, 146800640 sectors
Disk /dev/mapper/almalinux-swap: 7.79 GiB, 8367636480 bytes, 16343040 sectors
Disk /dev/mapper/almalinux-home: 386.96 GiB, 415500337152 bytes, 811524096 sectors