How to View All Available HDDs/Partitions in Linux?

A partition is the logical division of hard disk drives into different storage units. Each partition behaves like its own hard drive, allowing users to store and manage data independently. It allows the user to operate multiple operating systems in one machine. Linux offers extensible tools to create, alter, view, remove, and manipulate partitions.

This guide lists possible ways to view all available hard disk drive partitions in Linux.

Method 1: Using the “fdisk” Command

The “fdisk” is the “format disk”  built-in Linux command. It allows the user to create, alter, view, and remove the hard disk drive partitions. It also provides the partition details including “Start”, “End”, “Size”, and the “Type” of partitions. 

Run the “fdisk” command with superuser privileges and the “-l(list)” flag for getting the partition table:

$ sudo fdisk -l

Scroll down the page to view the partition table:

The output shows the hard disk drive partitions in a table format.

Method 2: Using the “cfdisk” Command

The “cfdisk” is the derivative of “fdisk” as it provides the text-based graphical interface. It also provides the hard disk drive partition table in a separate window named “Disk: /dev/sda”.

To perform this task simply execute the “cfdisk” utility with the “sudo” command in the following way:

$ sudo cfdisk

Press “Enter” to “Quit” from the opened “Disk” window from the terminal.

Method 3: Using the “lsblk” Command

The “lsblk” is known as  “list block devices” utilized for getting the devices and partitions details. It comes in almost all Linux distributions. 

Simple type the “lsblk” command and press the “Enter” key to view the available hard disk drives alongside their associated partitions:

$ lsblk

Here the device “sda” contains three partitions “sda1”, “sda2”, and “sda3”.


If the user wants to exclude the loo[ps information then run the above “lsblk” command with the combination of the “-f(file system detail)” and “-e(exclude the devices separated by comma) flags:

$ lsblk -f -e7

Method 4: Using the “parted” Command

Another command line too with the name “parted” is also beneficial to check the partitions of the hard disk. It is an alternative to the “fdisk” command because it provides the same functionality as “fdisk”. However, it also contains some additional features like resizing and copying partitions.

It controls all the hard disk drive partitions and also views them in this way:

$ sudo parted -l

The “1,2,3” in the “Number” column shows the partitions.

Method 5: Using the “Disks” Application (GUI)

Ubuntu snap store supports the “Disk” application by default to check and balance the hard disk drives and partitions. This section carries out some essential steps to perform this task.

Step 1: Access the “Disks” Tool

First, open up the “Disks” tool using the “Application Menu” search bar as shown in the image:

Click on the shown result and it will open the “Disks” window.

Step 2: View HDD Partitions

The “Disks” window contains a side panel in which all hard disk devices are placed. Now it displays the “Hard Disk” partitions information including the free space. 

Tap on the partition whose information require by the user:

The partition information includes “Size”, “Contents”, “Device”, “UUID” and “Partition Type”.


In Linux, Hard Disk Drives partitions can be viewed using  “fdisk”, “cfdisk”, “lsblk”, and “parted” command line utilities. The partition information can also be checked using the default “Disks” software application. This guide has briefly illustrated both CLI and GUI methods to view all available HDDs/partitions.