Which command would you use to list block devices including their UUIDs and labels?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

The command that effectively lists block devices along with their UUIDs and labels is blkid. This command is specifically designed for querying and displaying information about block devices, including their universally unique identifiers (UUIDs) and file system labels. When executed, blkid provides a comprehensive listing of all available block devices, allowing users to see essential information about each device in a straightforward format.

While df is used for reporting file system disk space usage, it does not display UUIDs or labels for block devices. Similarly, lsblk displays a list of block devices, but the standard output does not include UUIDs or labels unless specified with additional options. The mount command is utilized to attach filesystems to the directory tree but does not enumerate block devices or their identifiers. Hence, blkid is the most appropriate command for this task.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy