Which commands generate and view a filesystem label and UUID for a block device?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

Which commands generate and view a filesystem label and UUID for a block device?

Explanation:
You need to be able to see both the human-friendly name and the unique identifier that a filesystem assigns to a block device. The lsblk tool with the -f option prints a readable table that includes the filesystem type, LABEL, and UUID for each device, giving you a quick, at-a-glance view of what’s on the disk. The blkid command queries a specific device and returns its filesystem metadata, including LABEL and UUID, which is handy when you need the exact values for scripting or mounting. Using these together provides a reliable way to generate and verify the filesystem label and UUID for a block device: lsblk -f for a broad view, and blkid /dev/sdX to confirm the precise values. (If you need a script-friendly format, blkid -o export can be used, but for straightforward viewing, the combination above covers the essentials.)

You need to be able to see both the human-friendly name and the unique identifier that a filesystem assigns to a block device. The lsblk tool with the -f option prints a readable table that includes the filesystem type, LABEL, and UUID for each device, giving you a quick, at-a-glance view of what’s on the disk. The blkid command queries a specific device and returns its filesystem metadata, including LABEL and UUID, which is handy when you need the exact values for scripting or mounting. Using these together provides a reliable way to generate and verify the filesystem label and UUID for a block device: lsblk -f for a broad view, and blkid /dev/sdX to confirm the precise values. (If you need a script-friendly format, blkid -o export can be used, but for straightforward viewing, the combination above covers the essentials.)

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy