How to List All Connected Disks on Ubuntu with lsblk, fdisk, and GUI Tools
This guide walks you through multiple ways to enumerate every storage device attached to an Ubuntu system—including command‑line utilities like lsblk, fdisk, and parted as well as graphical tools such as GNOME Disks and GParted—while showing how to filter out unwanted loop or CD/DVD entries.
In this tutorial you will learn how to list every disk (SSD, HDD, USB, etc.) connected to an Ubuntu machine using both command‑line utilities and graphical applications.
Using lsblk
Run the basic command: sudo lsblk The TYPE column indicates whether an entry is a whole disk or a partition. By default the output also shows loop devices created by snap packages, which can be noisy.
Hide loop devices with the -e7 option: sudo lsblk -e7 You can further hide CD/DVD devices by adding -e11: sudo lsblk -e7 -e11 Alternatively, filter with grep: sudo lsblk | grep -v '^loop' To display vendor and model information, use the SCSI view:
sudo lsblk --scsiUsing fdisk
List all disks with sizes and partitions: sudo fdisk -l If you know a device name (e.g., /dev/sdb), query it directly: sudo fdisk -l /dev/sdb Multiple devices can be inspected in one call:
sudo fdisk -l /dev/sda /dev/sdbUsing parted
First install parted if it is not present: sudo apt install parted -y Then list all disks: sudo parted -l The output format mirrors fdisk but automatically omits loop devices.
Graphical tools
GNOME Disks
Open the application from the Applications menu. The left pane shows every connected storage device; selecting a disk reveals its size, partitions, and detailed information on the right.
GParted
Install GParted if needed: sudo apt install gparted -y Launch it (you will be prompted for your password). Use the drop‑down menu in the top‑right corner to choose a disk; the partitions of the selected disk are displayed below.
These methods cover both command‑line and GUI approaches for enumerating disks on Ubuntu, allowing you to choose the most convenient tool for your workflow.
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.
ITPUB
Official ITPUB account sharing technical insights, community news, and exciting events.
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.
