How to Find Disk Partition UUID in Ubuntu Linux
This article provides a concise method for locating the Universally Unique Identifier (UUID) assigned to disk partitions within the Ubuntu operating system. Identifying the UUID is critical for system administrators managing mount points, configuring the fstab file, or ensuring persistent storage identification across reboots. The following steps outline the specific terminal commands required to retrieve this data efficiently.
The primary command used to display the UUID of a specific disk
partition is blkid. While running blkid alone
lists all available partitions, you can target a single partition by
specifying its device path. Open your terminal and execute the following
command, replacing /dev/sda1 with your actual partition
identifier:
sudo blkid /dev/sda1The output will return the device name, its UUID, and the file system
type. For a structured view that shows UUIDs alongside mount points and
file systems for all devices, you can use the lsblk command
with the -f flag:
lsblk -fTo filter this list for a specific device using lsblk,
add the device path to the end of the command. Both methods provide
immediate access to the UUID without requiring additional software
installation. Ensure you use sudo if the command returns
permission errors, as accessing certain device metadata requires
administrative privileges.