How to List Hard Drive Partitions and Sizes

In this tutorial, you will learn how to get a list of hard drive partitions and their sizes on a Linux system. Follow along with the command line and GUI methods below to learn about all of the storage partitions on your system.

Check Partition Sizes With Commands

Method 1. The lsblk command shows information about the storage devices and partitions on our system:

$ lsblk


sda      8:0    0    80G  0 disk 
├─sda1   8:1    0     1M  0 part 
├─sda2   8:2    0   513M  0 part /boot/efi
└─sda3   8:3    0  79.5G  0 part /
sdb      8:16   0   500G  0 disk 
sdc      8:32   0  1000G  0 disk 
sr0     11:0    1   4.6G  0 rom

This output gives us the device name for each disk and partition, the size, and the mount point. From the output, we can determine:

  • sda is an 80GB disk
  • sda1 is a 1MB partition (default system-made partition)
  • sda2 is a 513MB partition mounted at /boot/efi (bootloader partition)
  • sda3 is a 79.5GB partition mounted at / (root partition)
  • We also see unpartitioned disks sdb and sdc, and a DVD drive (type: rom) sr0

Output displaying partition information using lsblk command

Method 2. The fdisk command also allows us to check on partition sizes for any hard disk.

$ sudo fdisk -l

Output showing hard disk information using fdisk command

Method 3. The df command is an easy way to see mounted partitions, their capacities, and total usage. Append the -h option to make the output human-readable.

$ df -h


Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3        78G   11G   64G  14% /
/dev/sda2       512M  6.1M  506M   2% /boot/efi

Output showing mounted partition information using df command

Method 4. We can also use the parted command to see detailed information about a storage device, along with all of its partitions. Specify the path to the device that you want to view information for, e.g., /dev/sda.

$ sudo parted /dev/sda print

Output of disk partition information using parted command tool

Check Partition Sizes With GUI

It’s easy to view the information of your disks’ partitions using the GUI via a desktop application. In this case, we are using GNOME on Ubuntu, so we will serach for the ‘Disks’ option in the Ubuntu’s Applications menu in order to see the detailed information for our disks’ partitions.

Using the Disk application on Ubuntu to view partition info

Leave a Comment

Your email address will not be published. Required fields are marked *