parted

Partition editor

high risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
Safer / dry-run alternatives
parted /dev/sdX printInspect before changing
sfdisk -d /dev/sdX > sdX.ptBack up the table
What it does

Create, resize and delete partitions, supports GPT and large disks. Many commands act at once in script mode.

Common flags
FlagMeaning
printShow the partition table
mklabelCreate a new partition table (destroys existing)
mkpartCreate a partition
rmDelete a partition
-sScript mode: no prompts
Examples
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 →
Related
fdisk lsblk mkfs
Open the full explainer →More in Disks & Filesystems

Reference text is hand-written and may be incomplete — check man parted for your version. Test destructive commands on a non-production system first.