Partition UUIDs in Linux

In the latest version of Ubuntu I noticed that partitions in fstab are referred using UUIDs instead of device names. If you want to find out the UUID for an existing partition then you can use a couple of rather obscure commands: blkid and vol_id.

blkid can be run as a regular user and without arguments will list all partitions and the corresponding UUIDs and labels. It can also be used to search for a partition if you know the UUID.

vol_id has to be run as root and you have to specify a partition.

UPDATE: You can also use tune2fs -l, as root.

UPDATE2: You can also use udevinfo as described in this blog post:
http://www.joeblog.info/index.php?/archives/369-guid.html

Technorati Tags:Technorati Tags:

3 comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
php4all (visitor) says:

The solution propose by rottex is the best way for me. Thank's all.

rottex (visitor) says:

or just use the basic commands of linux :-)

ls -l /dev/disk/by-uuid/

Michael (visitor) says:

Exactly what i was looking for. Thanks.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.

More information about formatting options