Which command would you use to create a GPT partition label on a disk?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

Which command would you use to create a GPT partition label on a disk?

Explanation:
Creating a GPT partition label with parted involves telling the tool which disk to modify, then asking it to create a new label of type GPT. The correct form places the device path first, then the subcommand, then the label type: parted /dev/sdX mklabel gpt. This sequence means: operate on /dev/sdX, create a new partition table, and specify GPT as the table type. This action wipes the existing partitioning scheme on that disk, so it should only be used when you intend to start fresh and you’ve backed up any data. The other forms don’t follow the typical parted syntax or don’t perform the intended action. Listing partitions (parted -l /dev/sdX) doesn’t create a label, and a form using a --label option isn’t a valid usage for this task.

Creating a GPT partition label with parted involves telling the tool which disk to modify, then asking it to create a new label of type GPT. The correct form places the device path first, then the subcommand, then the label type: parted /dev/sdX mklabel gpt. This sequence means: operate on /dev/sdX, create a new partition table, and specify GPT as the table type. This action wipes the existing partitioning scheme on that disk, so it should only be used when you intend to start fresh and you’ve backed up any data.

The other forms don’t follow the typical parted syntax or don’t perform the intended action. Listing partitions (parted -l /dev/sdX) doesn’t create a label, and a form using a --label option isn’t a valid usage for this task.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy