When you search for the question, “Which command is used to create partitions on an MBR or GPT disk?” you'll see four options: gdisk, cfsck, fdisk, and parted. **The correct answer is "parted."** Keep reading to learn how to use the parted command and understand the differences between the other three terminal commands.

1. Fdisk
2. Gdisk
3. Parted
4. fsck

1. Fdisk Partitioning Tool

`fdisk` is a command-line utility used for managing disk partitions in Linux and other UNIX-like operating systems. It enables users to create, delete, modify hard disk partition tables, and partition types. With fdisk, one can view the existing partition information on a disk, adjust partition sizes, or partition a new disk for organizing and managing data. Caution is advised when using fdisk, as incorrect operations can lead to data loss.

`fdisk` is a command-line utility in Linux used for managing disk partitions. It allows you to create, delete, and resize partitions, as well as set various partition attributes. `fdisk` also provides a convenient way to view information about existing partitions. Typically, `fdisk` is used to create or modify partitions on new or unused disks. However, it can also be used to alter existing partitions, but caution must be exercised to avoid data loss. When run without any arguments, `fdisk` displays a list of all available disks and their associated partitions. The `-l` option can be used to invoke `fdisk` to show detailed information about specific disks or partitions. For instance, the command `fdisk -l /dev/sda` will provide detailed information about the first hard disk on the system. Be cautious when using `fdisk`, as misuse can damage your data. To learn more about how to use this powerful tool, consult the `fdisk` documentation.

How do I use the fdisk command to create partitions in Linux?

Step 1. Enter the command sudo fdisk -l to list the partitions that currently exist on your system.

Step 2. Type sudo fdisk /dev/sda to enter command mode.

Creating a Partition with fdisk - 1

Step 3. Use single-letter commands to add the new partition (such as n for new).

Type n to create a new partition.

Select partition number

Set the first sector to 3622912 and the last sector to +2GB.

Creating Partitions with fdisk - 2

Type w and press Enter to write the changes to disk.

Step 5: Run sudo fdisk -l to verify that the partition has been created.

2. Gdisk

What is Gdisk?

gdisk is a free and open-source command-line tool used for managing disk partitions. It allows users to create, resize, delete, and format partitions, as well as convert between different partitioning schemes. gdisk also supports dynamic disks and the GUID Partition Table (GPT), which is the newer standard for disk partitioning. Similar to the fdisk utility, gdisk offers more options and flexibility. It is compatible with Windows, Linux, and macOS operating systems. gdisk was developed by Rod Smith.

Gdisk, also known as GPT fdisk, allows you to create partitions on a GPT disk. As such, gdisk cannot be used to create partitions on an MBR disk.

How to Create GPT Partitions Using Gdisk in Linux

Note: The following steps will delete all saved data. Back up your information if necessary.

Type **sudo gdisk /dev/sdb** and press **Enter**.

Step 2: Type n to create a new partition.

Note: If you want to manage partitions (not just create them), you can enter a question mark to get a list of all available commands.

Some common commands are:

c - Rename partition label

d - Delete a partition

p - Print the partition table

Me - Check the partition type

q - Quit the program without saving changes

t - Change the partition type code

w - write table to disk and exit

3. The Divided

`parted` is a disk partitioning and volume resizing utility. It is used for creating, deleting, resizing, checking, and copying partitions. `parted` can be employed to create both primary and logical partitions. Additionally, it allows for resizing NTFS partitions without data loss. `parted` supports GNU/Linux, BSD, macOS, and Windows systems. It is a free software licensed under the GNU General Public License (GPL).

How do I use the Parted command to create partitions?

Step 1: List existing partitions by running the following command: sudo parted -l

Parted command - 1

Step 2. Type sudo parted /dev/sdb to open the drive you want to manage.

Parted Command - 2

Step 3. Enter mklabel * to set the partition table (* represents the type of partition table, such as gpt). Type yes.

Step 4. Run the print command to check the partition table.

Step 5: Create the partition – Type mkpart primary ext4 1MB 1855MB. Then type print to confirm the information.

Parted Command - 3

Step 6: Enter the command quit to save your changes.

4. cfsck

`fsck` is a utility used to check the consistency of file systems in Unix-based operating systems. It is commonly employed after an abnormal system shutdown, such as a power failure, to repair file systems. `fsck` scans the file system, attempting to recover lost or damaged data and can fix common issues like incorrect file permissions. It should only be used on an unmounted file system, as using it on a mounted one can potentially cause further damage. `fsck` is part of the `e2fsprogs` package, which is included in most Linux distributions.

This command has nothing to do with partitioning, so you can skip this command.

A simpler solution: use a partitioning utility.

If you tend to create partitions on a Windows computer, then tool Partition Master Free is your best choice instead of Disk Management or diskpart. All operations will be done in simple steps. Believe in this trouble-free software.

Download Free Disk Manager:

< strong > Step 1. < /strong> Launch AOMEI Partition Assistant. On the main interface, right-click on the "Unallocated" space on the hard drive or external storage device and select "Create".

Step 2. Adjust the size of the new partition, the file system (choose a filesystem as needed), label, etc., and click OK to proceed.

Step 3. Click the Run 1 Task button and create a new partition by clicking Apply.

Watch the following video tutorial to learn how to create partitions on an NTFS, FAT, or EXT file system.