Linux 101 : Parted - GPT and MBR partitions

Parted is a tool to view, add, modify or delete partitions
Parted supports both MBR and GPT partitioning schemes.
MBR (Master Boot Record ) : used by systems that use the Bios.
GPT (GUID Partition Table) : used by systems that use UEFI.

Checking our disk:

The disk we have, has an MSDOS partition type as shown below, which is the equivalent of MBR:

Changing the partition type:

We change the partition type to GPT using the "parted" command "mklabel":


To choose an MBR partition, we use "mklabel msdos".

Creating a partition:

We create the first primary partition (number 1) with a 100 Megabytes size, and we check its creation with the "parted" command below "print":

Removing a partition:

We can remove a partition using the "parted" command below "rm partition_number":


Leave as a comment: