Operations 6 min read

How to List All Connected Disks in Ubuntu (CLI & GUI Guide)

This guide shows how to enumerate every SSD, HDD, USB, CD/DVD, and other storage device attached to an Ubuntu system using command‑line tools like lsblk, fdisk, and parted, as well as graphical utilities such as GNOME Disks and GParted, with options to filter out loop devices.

Liangxu Linux
Liangxu Linux
Liangxu Linux
How to List All Connected Disks in Ubuntu (CLI & GUI Guide)

In Ubuntu you can list all attached storage devices—including SSDs, HDDs, USB sticks, and CD/DVD drives—using several command‑line utilities.

Using lsblk

The basic command prints a tree of block devices: $ sudo lsblk By default it also shows loop devices created by snap packages. To hide them, add the -e7 option (7 is the major number for loop devices): $ sudo lsblk -e7 You can further exclude CD/DVD devices with -e11: $ sudo lsblk -e7 -e11 To display vendor and model information, use the --scsi flag:

$ sudo lsblk --scsi

Using fdisk

fdisk -l

lists every disk, its total size, partitions, and partition sizes: $ sudo fdisk -l If you know a device name (e.g., sdb), you can query that specific disk: $ sudo fdisk -l /dev/sdb Multiple devices can be inspected by listing their paths one after another:

$ sudo fdisk -l /dev/sda /dev/sdb

Using parted

The parted utility provides similar output without the noisy loop devices. Install it first if it is missing: $ sudo apt install parted -y Then list all disks:

$ sudo parted -l

Graphical tools

If you prefer a GUI, Ubuntu ships with the GNOME Disks application, which shows each storage device, its size, partitions, and detailed information when you select a disk from the left pane.

Another graphical option is GParted. Install it with: $ sudo apt install gparted -y After launching GParted (you may need to authenticate), use the drop‑down menu in the upper‑right to choose a disk; the partition layout will be displayed.

All of these methods allow you to quickly identify every storage device connected to your Ubuntu machine, filter out unwanted loop devices, and obtain vendor/model details when needed.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Linuxfdiskgui-toolslsblkdisk-listingsystem-administration
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.