Partition table manipulator
high risk
sfdisk -d /dev/sdX > sdX.ptBack up the partition tablelsblk -fVerify which device is whichInteractive tool to create/delete partitions on MBR/GPT disks. Changes are written only when you press w.
| Flag | Meaning |
|---|---|
-l | List partitions (read-only) |
-u | Show sizes in sectors |
fdisk -lList all partitions · explain & risk-check →fdisk /dev/sdbEdit /dev/sdb (interactive) · explain & risk-check →Reference text is hand-written and may be incomplete — check man fdisk for your version. Test destructive commands on a non-production system first.