What is UUID used in fstab

Sarath Pillai's picture
UUID for a device in linux

People who are used to the new releases of Ubuntu might be aware of the thing called UUID. Because Ubuntu guys have completely started using UUID as the method to uniquely identify disc drives/partitions on the machine.

Now on my machine(Ubuntu 11.10), i have my fstab entries as shown below:


Now what does that UUID thing in the image means??? and why is Ubuntu guys shifting towards the UUID thing, from the normal naming conventions we previously used like



UUID stands for Universally Unique IDentifiers

its an identification tag given to every device drives on the machine to uniquely identify the exact drive/partition.

UUID's look like the the below shown thing.


There are several major reasons for why Linux is shifting towards UUID's these days. I will explain them in short.

**Names assigned by the machine to devices are not always persistent. Sometimes attaching one more extra hard drive, will change the names previously given by the kernel.

**UUID's can assure you that the device you are trying to access is the exact device you intended

**No matter what number of disks and what type of disks are attached to the machine, the kernel will uniquely identify the exact device by its unique UUID number

Now lets understand how can we determine the uuid of a device/partition.

or you can do the following method to determine the UUID's of all currently available partitios.

Or you can also get the UUID by dump2fs command.But the output of the command will be too long, so use pipe less to see UUID entry of the partition.

Ubuntu is even using this UUID thing, for the grub disk identification. if you open the file /boot/grub/grub.cfg, you can find the entry like the below(in my case).

So if you want to add a new entry for a partition in /etc/fstb then you need to identify the UUID by blkid command as shown in this tutorial and then paste that uuid of the required partition in fstab with mount point..and rest is known.

Rate this article: 
Average: 4.6 (168 votes)

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.