LOGBOOK

HELP

1 / 22
Other keys: showSpace: good1-4: rate0: skip5: flag6: invert

Question

What are block devices in Linux and how are they named?

Answer

Block devices are storage hardware (disks, SSDs, cards) exposed as files under /dev/, named by how they connect — sd* for SATA/USB, vd* for VMs, nvme* for NVMe.

A block device moves data in fixed-size chunks (blocks), as opposed to a character device (like a keyboard) that streams byte by byte. Linux represents every disk as a special file in /dev/, so the kernel can talk to wildly different hardware through one uniform interface — and so you can manage it with ordinary tools once a filesystem is mounted on it.

The name encodes the transport, which is why it tells you something about the hardware:

Connection Pattern Example
SATA / SAS / USB /dev/sdX /dev/sda, /dev/sdb
virtio-blk (paravirtualized VM disk) /dev/vdX /dev/vda, /dev/vdb
NVMe SSD /dev/nvmeXnY /dev/nvme0n1
SD / MMC / eMMC card /dev/mmcblkX /dev/mmcblk0

The trailing letter counts whole disks (sda, sdb, …); a trailing number is a partition on that disk (sda1, sda2). NVMe is the odd one out: nvme0n1 means controller 0, namespace 1, and its partitions get a p: nvme0n1p2.

Why it matters: a /dev/sdX letter is assigned in detection order, so it can change between boots if you add or remove a disk. That is exactly why filesystems are mounted by stable UUID rather than by device name (see the UUID card).

Go deeper:

  • doc Device file (Wikipedia) — the block vs character device distinction (buffered vs unbuffered) and the /dev model.
or press any other key