Inspect the disk label, capacity, partition boundaries, and filesystem information for /dev/sdb using parted.
Do not enter an editing operation.
Which command is appropriate?
parted DEVICE print displays the partition table. mklabel, mkpart, and rm modify the layout.
Detailed explanation
parted /dev/sdb mklabel gptIncorrect. mklabel creates a new label and can discard the existing layout.
parted /dev/sdb printCorrect. parted /dev/sdb print displays the disk and partitions.
parted /dev/sdb rm 1Incorrect. rm deletes a partition.
parted /dev/sdb mkpart primary 1MiB 1GiBIncorrect. mkpart creates a partition.
Try it yourself
An example you can run in a temporary verification environment.
parted --help | sed -n '1,24p'Expected result
print、mklabel、mkpart、rm等のコマンド説明Key points
- print is a query
- parted handles MBR and GPT
- Separate read-only and edit commands
Notes
- Environment: GNU Parted 3.x / ヘルプ表示のみ
- Use read-only inspection or a disposable disk when learning storage commands.
- Partition and LVM writes can destroy data; verify the target before running them.
Foundation review
Place the operation
print queries the layout; mklabel, mkpart, and rm are state-changing operations.
Check the side effect
Use a disposable disk or help output when learning destructive partition commands.