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:

  1. 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

    ReplyDelete
  2. Anonymous11:51 AM

    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.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. 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!!!!

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

    ReplyDelete
  6. Anonymous11:34 PM

    Works in Fedora 16. Thanks

    ReplyDelete
  7. Anonymous11:18 AM

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

    blkid /dev/sda1

    ReplyDelete