In this guide, we will show how to list storage disks and partitions in Linux systems. We will cover both command-line tools and GUI utilities. By the end of this guide, you will learn how to view or report information about disks and partitions on your Linux server or desktop computer, or workstation.
[ You might also like: 3 Useful GUI and Terminal Based Linux Disk Scanning Tools ]
1. List Linux Disks Using fdisk Command
fdisk is a widely-used command-line tool for manipulating disk partition tables. You can use it to view disks and partitions on your Linux server as follows.
The -l
flag implies list partitions, if no device is specified, fdisk will display partitions from all disks. It requires root privileges for you to invoke it, so use the sudo command where necessary:
$ sudo fdisk -l
2. View Linux Disk Partitions Using lsblk Command
lsblk is a utility for listing block devices. You can use it to view disks and partitions on your Linux computer as follows. It runs well without the sudo command:
$ lsblk
To view extra information about disks, use the -f
command line option as shown:
$ lsblk -f
3. View Linux Disks Using hwinfo Command
hwinfo is another useful utility for viewing information about your hardware, particularly storage disks. If you can not find the hwinfo command on your system, run the following command to install it:
$ sudo apt install hwinfo [On Debian, Ubuntu and Mint] $ sudo yum install hwinfo [On RHEL/CentOS/Fedora and Rocky Linux/AlmaLinux] $ sudo emerge -a sys-apps/hwinfo [On Gentoo Linux] $ sudo pacman -S hwinfo [On Arch Linux] $ sudo zypper install hwinfo [On OpenSUSE]
Once you have the hwinfo package installed, run the command with the --disk
command line option as shown:
$ sudo hwinfo --disk
From the output of the previous command, there is a lot of information about a disk or its partitions that hwinfo displays. If you wish to view an overview of block devices, run this command:
$ sudo hwinfo --short --block
To show a summary of all disks, run the command:
$ sudo hwinfo --disk --short
4. Find Linux Partitions Information Using Disk Tool
On a Linux desktop computer, you can also use a graphical user interface (GUI) application to view a list of disks attached to your computer. First, search for disks application in the system menu. Then open it to view your disks and their partitions.
That’s all for now. For more information about the commands used in this guide, check out their man pages. You can also share your thoughts with us via the comment form below.
How can I view drives and partitions in the format (hdx,xx) in the Linux terminal? I prefer not to use the GRUB command line.
@Knox,
You can use the lsblk command to view drives and partitions in the format (hdx,xx) in terminal.
Is it possible to view a disk (e.g. sda/sdb) graphically in a file manager such as Nautilus, Nemo, Thunar, etc?
@Luke,
Yes, you use Nautilus to view a disk graphically in Linux.
Open Nautilus, you will see a sidebar on the left-hand side displaying your system’s file hierarchy. Look for the “Devices” section in the sidebar.
Under the “Devices” section, you should see a list of available disks and partitions on your system. Click on the disk you want to view.
Ravi,
Thanks for the reply. In my case, there are no “Devices” in my native Ubuntu file manager. The latest version is called “Files” v. 42.6, and is a Gnome project.
I looked in Preferences for any mention of Devices but, no. I also have the Nemo file manager and it’s the same. No listing of hard drives by symbol or icon.
Since Linux does not identify volumes by a drive letter (as in Windows), I suspect there’s no way to view them as icons or folders.
@Luke,
Yes, Nautilus is the only way to view disks graphically. You can use Baobab (also known as Disk Usage Analyzer), which provides a visual representation of disk usage. Baobab is commonly found in Linux distributions that use GNOME as their desktop environment.