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.
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 --scsiUsing fdisk
fdisk -llists 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/sdbUsing 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 -lGraphical 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.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
