List, View, and Find Hard Disk Names in Linux

Understanding the Linux disk naming scheme is crucial for effectively identifying and organizing multiple disks within the system. By familiarizing yourself with the various disk types and their corresponding identifiers, you can efficiently navigate and optimize your disk usage.

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 that addresses 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, the letter b for the second detected, the letter c for the third detected disk, 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. Linux uses numbers instead of letters to identify disks. For the first disk, it uses 0n. The second disk 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 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.

#man lsblk

This tutorial is part of the tutorial series Linux disk management concepts and configurations. Other parts of this series are the following.

Chapter 01  Linux disk management terminology
Chapter 02  File Management Commands in Linux
Chapter 03  Linux file system types explained
Chapter 04  Adding and removing hard disks in VMware Workstation
Chapter 05  List view and find hard disk names in Linux
Chapter 06  The fdisk command on Linux explained
Chapter 07  Manage Linux disk partition with the gdisk command
Chapter 08  The /etc/fstab file on Linux explained
Chapter 09  Linux disk management with the parted command
Chapter 10  The mkfs command on Linux
Chapter 11  The mount command on Linux temporary mounting
Chapter 12  The swap space on Linux explained
Chapter 13  How to create a swap partition in Linux
Chapter 14  How to configure LVM in Linux step-by-step
Chapter 15  How to configure RAID in Linux step-by-step

Conclusion

The lsblk command is an essential tool for managing and monitoring disk drives in Linux. It supports various options that extract specific information about each disk. Mastering this command enhances your ability to manage storage devices within the Linux environment.

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

We do not accept any kind of Guest Post. Except Guest post submission, for any other query (such as adverting opportunity, product advertisement, feedback, suggestion, error reporting and technical issue) or simply just say to hello mail us ComputerNetworkingNotes@gmail.com