Monday, October 29, 2007

How to find the UUID of device?

You can use the following command to find the UUID of devices in Linux
ls -l /dev/disk/by-uuid/

This works with Ubuntu. Not sure about other distros.

7 comments:

Unknown said...

This actually works on any disto using udev v100 or better. Some older versions may work as well, but I have been able to use since at least 100. Gentoo and Ubuntu FTW

Anonymous said...

Don't forget to restart udev if you would like to have new volumes you may have created (e.g. logical volumes) to show up in this directory.

Joe Pea (trusktr) said...
This comment has been removed by the author.
Maxpolaris said...

very cool! I had no idea the ls command could do that! I've spent so much time looking for such an easy way to find that info. Thanx!!!!

Maxpolaris said...

ps it worked on PCLinuxOS KDE
I will check
Damn Small Linux TinyCore Slax Slitaz Mint 10 Puppy and Suse 11 later!

Anonymous said...

Works in Fedora 16. Thanks

Anonymous said...

You can also use blkid to find device attributes including the UUID.

blkid /dev/sda1