Inspect filesystem type, UUID, and label for /dev/sdb1 to obtain an identifier for /etc/fstab.
Do not modify the device.
Which command is appropriate?
blkid reads block-device signatures and displays UUID, LABEL, and TYPE, which can be used in persistent mount configuration.
Detailed explanation
mkfs.ext4 /dev/sdb1Incorrect. mkfs creates a new filesystem and can overwrite existing identifiers.
blkid /dev/sdb1Correct. blkid /dev/sdb1 displays the filesystem identity fields.
mount /dev/sdb1 /mntIncorrect. mount attaches the device but is not the dedicated identifier query.
fsck /dev/sdb1Incorrect. fsck checks consistency rather than primarily retrieving fstab identifiers.
Try it yourself
An example you can run in a temporary verification environment.
blkid --help | sed -n '1,14p'Expected result
block device attributesを検索・表示する使用法Key points
- blkid reads signatures
- UUID and TYPE are shown
- It does not change state
Notes
- Environment: util-linux blkid / ヘルプ表示のみ
- Prefer help or version output and a disposable device when testing storage commands.
- Formatting, repair, and mount changes can affect data or availability.
Foundation review
Place the operation
Identifier discovery is separate from filesystem creation and consistency checking.
Check the side effect
Record the identifier before editing persistent mount configuration.