The Hardware Identification Problem
You are managing a headless Linux server (a server with no monitor or graphical user interface) over a remote SSH connection. You physically walk into the server room and plug a new 4-Terabyte USB hard drive into the back of the machine. Now, you need to format that drive and mount it so you can use it for backups.
If you were using Windows, a popup would instantly appear saying “Drive E: Connected,” and you could format it with a right-click. In the Linux terminal, there are no popups. Worse, Linux does not use friendly letters like “C:” or “E:” for drives. It uses obscure device names like /dev/sda or /dev/nvme0n1. If you accidentally format the wrong device name, you will instantly wipe the server’s operating system and destroy all the company’s data.
Before you run any formatting or mounting commands, you must definitively identify the new hardware. The safest and most visual tool for this job is the lsblk (List Block Devices) command. It prints a beautiful, tree-like diagram of every physical storage device attached to the computer, showing their sizes and how they are partitioned.
Reading the Basic lsblk Output
Unlike destructive formatting commands, lsblk is a purely informational command. It only reads data; it does not change anything. Therefore, you can safely run it without sudo privileges.
lsblk
When you run this command, Linux prints a clean table with columns for the Device Name (NAME), Major/Minor numbers (MAJ:MIN), whether it is Removable (RM), the Size (SIZE), whether it is Read-Only (RO), the Type (TYPE), and the Mountpoint (MOUNTPOINT).
Understanding the Device Tree
The most important columns are the NAME and the SIZE. The output is structured like a tree, showing the main physical drive and the partitions sliced out of it.
You will likely see a main drive named sda (which stands for SCSI Disk A). Underneath it, branching out, you will see partitions like sda1 and sda2. The numbers indicate the partitions on that specific physical disk.
If you plugged in a new 4TB USB drive, you look at the SIZE column to find the one that says 4T. Let’s say the 4TB drive is labeled sdb (SCSI Disk B). Because it is brand new, it will likely have no partitions branching underneath it, and the MOUNTPOINT column will be completely blank, confirming that the operating system has not yet hooked it into the file system.
You now know with absolute certainty that your new hardware is named /dev/sdb, and you can safely proceed to format that specific device without touching your main sda operating system drive.
Advanced Usage (Filesystem Info)
If you want to know even more about the drives, such as what filesystem they are formatted with (ext4, NTFS, FAT32) or their unique UUIDs, you can add the -f flag.
lsblk -f
This expands the table to show the FSTYPE (Filesystem Type) column. This is incredibly helpful when verifying if a USB drive you plugged in is formatted for Windows (NTFS) or Linux (ext4).
Stop blindly guessing drive names and risking catastrophic data loss. By using the Linux lsblk command, you can instantly generate a safe, visual map of your physical storage hardware, verify drive sizes, and confidently identify the correct device before formatting or mounting.