Partition editor
high risk
parted /dev/sdX printInspect before changingsfdisk -d /dev/sdX > sdX.ptBack up the tableCreate, resize and delete partitions, supports GPT and large disks. Many commands act at once in script mode.
| Flag | Meaning |
|---|---|
print | Show the partition table |
mklabel | Create a new partition table (destroys existing) |
mkpart | Create a partition |
rm | Delete a partition |
-s | Script mode: no prompts |
parted /dev/sdb printShow partitions · explain & risk-check →parted -s /dev/sdb mklabel gpt mkpart primary ext4 0% 100%New GPT with one partition · explain & risk-check →Reference text is hand-written and may be incomplete — check man parted for your version. Test destructive commands on a non-production system first.