List, View, and Find Hard Disk Names in Linux

This tutorial explains how to use the lsblk command to list, find, check, and view hard disk names in Linux. Learn the Linux disk naming scheme in detail.

Linux disk naming scheme is a convention Linux uses to label and identify attached hard disks.

The following table lists the disk types and their meanings.

Disk Type Description
/dev/sda Linux uses the label sd for SCSI and SATA disks. Server systems mainly use these disks. VMware virtual machines also use these disks.
/dev/hda It uses the label hd for legacy IDE disk devices. The use of IDE disks on modern computers is rare.
/dev/xvda Xen virtual machine uses this disk type.
/dev/nvme0n1 It uses the label nvme0n for NVM Express (NVMe) interfaces. NVMe is a server-grade method to address advanced SSD devices.

A system can have multiple disks. Linux assigns an identification letter to each disk. It uses alphabet letters in ascending order as identification letters. For example, it uses the letter a for the first detected disk. For the second detected disk, it uses the letter b. For the third detected disk, it uses the letter c, and so on for all subsequent disks.

You can install as many disks as your system supports. You can have up to /dev/sdz and even beyond. After /dev/sdz, Linux continues creating devices with names like /dev/sdaa and /dev/sdab.

The only exception to this convention is the NVM Express (NVMe) interface. For it, Linux uses numbers instead of letters to identify disks. For the first disk, it uses 0n. For the second disk, it uses 1n, and so on.

Listing / viewing / finding disk names

To list, view, or find attached disk names, we can use the lsblk (list block devices) command. This command provides information about all connected disks. It prints their names, sizes, and mount points. It also displays the partitions disks have.

The following image shows the output of this command.

lsblk command

This command supports many options and arguments. You can use them as per your requirement to customize the output or get specific information. For example, you can use the -f option to view information about the file system used on partitions and disks.

lsblk command with f option

You can check its man page for a complete list of all supported options and arguments.

ComputerNetworkingNotes Linux Tutorials List, View, and Find Hard Disk Names in Linux