Inspect UUID, LABEL, and TYPE for /dev/sdb1.
Find the identifiers for a persistent mount without modifying the device.
Which command is appropriate?
blkid DEVICE displays the content type and attributes such as UUID and LABEL. These tags can be used in fstab.
Detailed explanation
mount /dev/sdb1Incorrect. mount without a target does not provide the requested general attribute report.
Incorrect. mount without a target does not provide the requested general attribute report.
mkfs /dev/sdb1Incorrect. mkfs initializes a filesystem and may destroy data.
Incorrect. mkfs initializes a filesystem and may destroy data.
umount /dev/sdb1Incorrect. umount detaches a filesystem.
Incorrect. umount detaches a filesystem.
blkid /dev/sdb1Correct. blkid /dev/sdb1 displays UUID, LABEL, and TYPE.
Correct. blkid /dev/sdb1 displays UUID, LABEL, and TYPE.
Try it yourself
An example you can run in a temporary verification environment.
blkidExpected result
権限と環境に応じて認識済みブロックデバイス属性を表示するKey points
- Inspect UUID
- Inspect TYPE
- No changes are made
Notes
- Environment: util-linux blkid 2.39以降
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.