Disk and Storage

parted

Creates and edits partition tables, including GPT.

parted is a partitioning tool that supports modern disks and GPT workflows. It can be used interactively or scripted.

Syntax
parted [options] device [command]

Arguments explained

  • device is the target disk.
  • print shows partition information.
  • mklabel creates a partition table.
  • mkpart creates a partition.

Common examples

Print disk layout
sudo parted /dev/sda print

Shows the partition table for /dev/sda.

Open interactive mode
sudo parted /dev/sdb

Starts an interactive partitioning session.

parted Command
FieldDetails
Commandparted
CategoryDisk and Storage
Primary useCreates and edits partition tables, including GPT.
Syntaxparted [options] device [command]