Linux: How to get Harddisk UUID number

advertisement logo

 

Modern Linux system uses UUID instead of traditional block name (/dev/hda1, /dev/hda5, /dev/sdb) to uniquely identify harddisk or other storage medium. This is because UUID is unique and never changes even if you switch the harddisk ordering.

So by mounting or refering your hard disk by its UUID, you are guaranteed to mount the correct storage medium no matter where its connected on your system.

Here’s how to get your harddisk UUID number

Method 1: Ubuntu and Debian Way

sudo vol_id /dev/hda1

This command display harddisk extra information including its filesystem and uuid number.

Method 2: using /dev/disk/by-uuid/

Another method which works universally on modern GNU Linux operating system is :

ls -l /dev/disk/by-uuid

which will uuid of connected storage medium to your computer.

That’s all, now you can easily identify your storage disk UUID number without much problem anymore.

Bookmark this article
  • digg
  • YahooMyWeb
  • NewsVine
  • Netvouz
  • Reddit
  • Spurl
  • Furl
  • del.icio.us
  • StumbleUpon
  • Technorati
  • TwitThis
Tags: , , , , , , , , ,

Keep updated with this website! : Subscribe to your email

Recommended Reading

3 smashing comments for this post.

  1. remke Said:

    blkid (using ubuntu)

  2. sybillinux Said:

    Hey, thanks, I always read your post, they are always useful, concise, effective… great, in one world.
    This is one of the most useful to me.

    See you! Some channel, same time! :-)

    SybiLLinux

  3. mike Said:

    Thanks; I tried that but it it didn’t work for me originally. I had to use

    sudo /lib/udev/vol_id /dev/hda1

    since the vol_id program wasn’t in my path. I found it using “locate vol_id”.

Leave a Comment

Subscribe by email

Enter your Email