List disk, partition, and LVM parent-child relationships together with FSTYPE, LABEL, UUID, and mount points.
Which command is appropriate?
lsblk -f displays the block-device tree and filesystem attributes such as type, label, UUID, availability, and mount points.
Detailed explanation
du -sh /Incorrect. du summarizes directory usage.
Incorrect. du summarizes directory usage.
df -hIncorrect. df shows usage of mounted filesystems, not the device hierarchy.
Incorrect. df shows usage of mounted filesystems, not the device hierarchy.
lsblk -fCorrect. lsblk -f combines device relationships and filesystem attributes.
Correct. lsblk -f combines device relationships and filesystem attributes.
find /dev -type bIncorrect. find can list block nodes but does not map UUIDs or mounts.
Incorrect. find can list block nodes but does not map UUIDs or mounts.
Try it yourself
An example you can run in a temporary verification environment.
lsblk -fExpected result
NAME、FSTYPE、LABEL、UUID、FSAVAIL、FSUSE%、MOUNTPOINTS等Key points
- lsblk shows block hierarchy
- -f adds filesystem fields
- It is a read-only overview
Notes
- Environment: util-linux lsblk / 読み取り操作
- 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.