4 Ways to View Disks and Partitions in Linux

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
Check Linux Disk Partitions
Check Linux Disk Partitions

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
View Linux Disk Partitions
View Linux Disk Partitions

To view extra information about disks, use the -f command line option as shown:

$ lsblk -f
View Linux Partitions Info
View Linux Partitions Info

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
View Linux Disk Information
View Linux Disk Information

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
View Linux Disks Overview
View Linux Disks Overview

To show a summary of all disks, run the command:

$ sudo hwinfo --disk --short
List Summary of Linux Disks
List Summary of Linux Disks

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.

Find Linux Disk Partitions Info
Find Linux Disk Partitions Info

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.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

Aaron Kili
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

6 Comments

Leave a Reply
  1. 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.

    Reply
    • @Knox,

      You can use the lsblk command to view drives and partitions in the format (hdx,xx) in terminal.

      lsblk -o NAME,MODEL,SIZE,FSTYPE,UUID
      
      Reply
    • @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.

      Reply
      • 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.

        Reply
        • @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.

          $ sudo apt-get install baobab 
          
          Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.