Updated: 9 October 2026 · Applies to: util-linux 2.37 to 2.41 (lsblk, fdisk, findmnt), tested on AlmaLinux 9.8 and Ubuntu 26.04; the same commands on Rocky Linux, RHEL 9 and 10, AlmaLinux 10, Ubuntu 24.04 and Debian 13

To list all disks and partitions in Linux, with their size, file system and where they are mounted, run lsblk. It needs no root rights and works the same on every current distribution:

lsblk -o NAME,TYPE,FSTYPE,SIZE,MOUNTPOINTS

A partition with an empty MOUNTPOINTS column is not mounted. The rest of this article shows how to list only the hard drives, only the unmounted partitions, and LVM volumes. The output below comes from an AlmaLinux 9.8 server with one 50 GB virtual disk.

1. List all disks and partitions

$ lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda      8:0    0   50G  0 disk
|-sda1   8:1    0 48.8G  0 part /
`-sda2   8:2    0  1.2G  0 part [SWAP]

(Shortened: on our server sda1 had a second mount point used by the container engine.)

TYPE tells you what each line is: disk is a whole drive, part a partition, lvm an LVM logical volume, raid1 and similar a software RAID array, rom a CD/DVD drive and loop a file mounted as a disk (Ubuntu shows many loop devices for snap packages; hide them with lsblk -e 7). Disk names depend on the hardware: sda for SATA and SCSI, vda for many virtual servers, nvme0n1 with partitions nvme0n1p1 for NVMe drives. On systems older than util-linux 2.37 use the column MOUNTPOINT instead of MOUNTPOINTS.

2. List only the hard drives (Ubuntu and every other distribution)

$ lsblk -d -o NAME,SIZE,TYPE,ROTA,TRAN,MODEL
NAME SIZE TYPE ROTA TRAN MODEL
sda   50G disk    1 ata  QEMU HARDDISK

-d leaves out the partitions. ROTA is 1 for a spinning disk and 0 for SSD and NVMe (virtual disks often report 1, see how to check whether a disk is SSD or HDD); TRAN is the connection (sata, nvme, usb). Add SERIAL to the list to match a drive to its label. Other ways to list the drives:

sudo fdisk -l                       # every disk with its partition table
sudo lshw -class disk -short        # hardware view (package lshw)
ls -l /dev/disk/by-id/              # stable names with model and serial
cat /proc/partitions                # what the kernel sees, no tools needed

fdisk -l also shows the partition table type and the partition types (shortened):

Disk /dev/sda: 50 GiB, 53687091200 bytes, 104857600 sectors
Disk model: QEMU HARDDISK
Disklabel type: gpt

Device         Start       End   Sectors  Size Type
/dev/sda1       2048 102400000 102397953 48.8G Linux filesystem
/dev/sda2  102400001 104857566   2457566  1.2G Linux swap

On Ubuntu Desktop the Disks app (package gnome-disk-utility) shows the same in a window.

3. Show unmounted drives and partitions

lsblk -rno NAME,TYPE,MOUNTPOINTS | awk '$2=="part" && $3==""'

-r prints raw columns that are easy to filter and -n drops the header. The command prints one line per unmounted partition and nothing at all when every partition is in use, as on our test server. It works with any disk naming, including vda1 and nvme0n1p2, unlike filters that only look for names starting with "sd".

A brand-new disk has no partitions yet, so it appears in lsblk as a disk line with nothing under it. Check it with lsblk -f /dev/sdb: an empty FSTYPE means no file system.

Some partitions look unmounted but are in use in another way. Do not format these:

  • LVM physical volumes (FSTYPE LVM2_member) and RAID members (linux_raid_member).
  • Swap, shown as [SWAP] or listed by swapon --show.
  • The EFI system partition and the small BIOS boot partition.

4. Show file systems, labels and UUIDs

$ lsblk -f
NAME   FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda
|-sda1 ext4   1.0   root  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx     33G    26% /
`-sda2 swap   1           xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx                [SWAP]

(UUIDs replaced, second mount point removed.) sudo blkid lists the same signatures. The UUID or LABEL is what you put in /etc/fstab to mount a partition at every boot.

5. List volumes: LVM and mounted file systems

Many servers, including Ubuntu Server with its default storage layout, keep the system on LVM. The three LVM layers each have a list command:

sudo pvs      # physical volumes (the partitions or disks LVM uses)
sudo vgs      # volume groups, with their total and free space
sudo lvs      # logical volumes (what you format and mount)

In lsblk logical volumes appear with TYPE lvm under the partition they live on, for example ubuntu--vg-ubuntu--lv. Free space in a volume group (the VFree column of vgs) can be added to a volume; see how to resize LVM volumes.

For the mounted volumes and how full they are, use df (the -x options hide memory and container file systems):

$ df -hT -x tmpfs -x devtmpfs -x overlay -x efivarfs
Filesystem     Type  Size  Used Avail Use% Mounted on
/dev/sda1      ext4   48G   13G   34G  28% /

6. Compare with what fstab expects

$ findmnt --fstab
TARGET SOURCE     FSTYPE OPTIONS
/      LABEL=root ext4   defaults
$ sudo findmnt --verify
Success, no errors or warnings detected

findmnt --verify reports fstab entries whose device cannot be found. An entry that is not mounted after a reboot usually points to a missing disk or a wrong UUID. More options are in findmnt: show mounted file systems.

Mount an unmounted partition

sudo mkdir -p /data
sudo mount /dev/sdb1 /data

To mount it at every boot, add it to /etc/fstab by UUID; the full steps are in how to partition and mount a new disk with parted. To add a new disk to an existing LVM volume group, see how to add new disks using LVM.

Official documentation: lsblk, findmnt and lvs manual pages.

Ucartz services for this topic

Was this answer helpful? 0 Users Found This Useful (0 Votes)