Disks & Partitions
Disks & Partitioning
Disks appear under /dev: sda, sdb (SATA/SCSI), nvme0n1 (NVMe), vda (virtio). Partitions are numbered: sda1, nvme0n1p1.
| Command | Purpose |
|---|---|
lsblk | Tree of block devices |
blkid | UUIDs & filesystem types |
fdisk /dev/sda | Partition (MBR & GPT) |
parted /dev/sda | Scriptable partitioning (GPT) |
gdisk | GPT-specific |
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 50G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 49G 0 part /
Exam tip: MBR supports max 4 primary partitions and 2 TB disks; GPT supports up to 128 partitions and huge disks. UEFI systems require GPT.