CmdID

CmdID / Commands

sgdisk

Manage GUID Partition Tables (GPT). tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Manage GUID Partition Tables (GPT). Part of the GPT fdisk suite; designed for scripting and automation.

Display basic GPT partition summary data for a device

sudo sgdisk --print /dev/sdXIdentify

Wipe both GPT and MBR data structures from a device (destroys all partition information)

sudo sgdisk --zap-all /dev/sdXIdentify

Convert a GPT disk to MBR format using up to four partitions

sudo sgdisk --gpttombr 1:2:3:4 /dev/sdXIdentify

Delete a partition entry by number (data in sectors remains untouched)

sudo sgdisk --delete 1 /dev/sdXIdentify

Save the current in-memory GPT data (protective MBR, headers, and table) to a binary backup file

sudo sgdisk --backup /path/to/backup.gpt /dev/sdXIdentify

Load GPT data from a backup file (restoring from a non-original disk is not recommended)

sudo sgdisk --load-backup /path/to/backup.gpt /dev/sdXIdentify

Verify GPT structures for CRC errors, mismatches, or inconsistencies

sudo sgdisk --verify /dev/sdXIdentify

Display a summary of available partition type codes (no device required)

sgdisk --list-typesIdentify