UUIDs in Ubuntu

List UUIDs for all the devices

UUIDs have been there since Edgy, we can use the blkid command to get a list of all the drives and partitions along with their UUIDs. Open Terminal and type:

sudo blkid

Get UUID for a particular device

If we know a device label and want to confirm the UUID for to use it in /etc/fstab, here’s how we can do it using vol_id command:

vol_id -u /dev/sdb1

The UUID can be used as an identified object like /dev/sdb1 above. the syntex is:

UUID=xxxxxxxxxxxxxxxxxxxxxxxxx

Replace the xxx with actual identifier derived from one of above commands.

Advertisements

About Sandeep Bhalla

A lawyer, thinker, author, Linux/Ubuntu power user and sometime an economist or gardener or philosopher or cook or photographer depending upon the current thought and environment. View all posts by Sandeep Bhalla

Please share your views.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s