Back to the command reference

parted

DisksAdvancedReference only

Partition tool with GPT and large disk support

Name: parted = partition editor

This command is outside what the site lets you practise (mostly distribution-specific or rarely used tools). This page describes how to use it; try it on your own Linux system.

Description

parted is another partitioning tool with GPT and >2 TB disk support, usable interactively or in one-line commands. Note that many parted operations take effect immediately; there is no final write step.

Syntax

parted [OPTION]... [DEVICE [COMMAND]]

Common options

printShow the partition table
mklabel gptCreate a GPT label
mkpartCreate a partition
rmDelete a partition, e.g. rm 2
resizepartResize a partition
-l / --listList partitions on every disk
-s / --scriptNever ask (for scripts)

Examples

  • $ sudo parted /dev/sdb print

    Show partitions

    Explain

Related