🐧 How to list all disks, partitions and their sizes on Linux – IT is good

🐧 How to list all disks, partitions and their sizes on Linux – IT is good

The purpose of this guide is to list all disks, partitions and their sizes in a Linux system.

This will help you determine how much hardware storage you have, how the disks are partitioned, and how big each one is.

See the command line methods below!

⚙️ Overview of ways to view disks and partitions in Linux

How to List All Disks, Partitions and Sizes in Linux

We will first look at the command line methods that can be used to get a list of hard drive information in Linux.

There are several of them, so you can choose which one to use.

The lsblk command will list all storage devices attached to the system, their configured partitions and sizes.

$ lsblk

The screenshot below shows that we have one hard drive labeled as sda with a size of 150 GB.

You can see its partitions and their sizes listed below the drive.

The fdisk command is another way to get the same information.

$ sudo fdisk -l

df is a good way to see all the partitions on the system, but it doesn’t list raw block devices.

It will also show the size of the partition, the percentage of the partition currently in use, and where the partition was mounted.

We recommend using the -h option to present the output in a human-readable format.

$ df -h

see also:

HOWTO,AlmaLinux,Arch Linux,CentOS,Debian,Linux,OpenSUSE,RHEL,Rocky Linux,Ubuntu,

#list #disks #partitions #sizes #Linux #good

Leave a Comment

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