parted Command Examples

A partition manipulation program. See also: parted-interactive, partprobe. More information: https://www.gnu.org/software/parted/parted.html.

sudo parted --list

sudo parted {{/dev/sdX}} --script mklabel {{aix|amiga|bsd|dvh|gpt|loop|mac|msdos|pc98|sun}}

sudo parted {{/dev/sdX}} --script mklabel gpt mkpart primary 0% 500MiB mkpart primary 500MiB 100%

sudo parted {{/dev/sdX}}