Ubuntu: What command do I use to find physical disk size?


I use df -h to see formatted size, but how to see actual?

I believe one of my disks is 3TB but formatted as 2TB but not sure which. (they're remote so I can't look!)


You can try lsblk.

That should list all disks including size. It will also list partitions and mount points.


You could try parted

sudo parted -l  

or if you know the particular disk's block device e.g. /dev/sda

sudo parted /dev/sda print   

As well as looking at the formatted partition size(s), take note of the 'Partition Table' line - if the disk was formatted with 'Partition Table: msdos' then you may be bumping up against the intrinsic 2TB limit - the disc may need to be converted to a GPT partition table in order to access the full 3TB


You can also try the following command:

sudo hdparm -I /dev/your_device |grep GB

Change your_device with a the device name (sda, sdb, etc)

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »