This is an awesome tip. Just to note you have to say “disk” in the path /dev/disk because without it, the command will not work. Example ls -l /dev/sda1/by-uuid is incorrect.
There is an update to this post available: UUIDs and Linux: Everything you ever need to know.
The Universally Unique Identifier can be used to identify a device independent form its mount point or device name. This is more and more important as many devices today support hot-plugging or are external anyway. Therefore it makes sometimes sense to access a device (for example in
fstab) not by device name but by the UUID.
There are several ways to get the UUID. The first one uses the
/dev/ directory. While you are on is you might want to check other
by-* directories, I never knew of them.
Another way to get the uuid by usage of the tool
There you also get the label and other information. Quite usefule.
Btw., if you wonder how “unique” this unique is, here a quote from Wikipedia:
1 trillion UUIDs would…
View original post 28 more words