2 ways to know the UUID of your HDD partitions


To finish a small application that I am doing (thinking about KDE mainly) I am forced into something really annoying ... I must know by some method the UUID user keyboard, which I still can't figure out TT ... if someone knows something about it, give me a clue okay 😀

Well let's start by explaining what a UUID (Universal Unique IDentifier):

UUID stands for Universally Unique Identifier. This is a standard identifier code that is used in the software building process.

Its intention is to enable a unique information code without having to have a central coordination for its generation, this means that anyone should be able to generate a UUID with certain information from anywhere without having to be connected to a central device that assigns the codes. The resulting file can be mixed in databases without having duplicate conflicts.

I made this quote from a article on the Tralix.com blog, although they can also rely on Wikipedia.org (ENG) for more details. Basically and without so many detours or technical details, UUID of a partition of some HDD of ours, it is simply the fingerprint of that partition, the unique and special number that will identify it (I do not live in Spain, but I imagine that it has been similar to the DNI, right?)

Anyway, the matter at hand 🙂

Here you will see 2 ways / ways / methods to know the UUIDs of our partitions:

Table of Contents


1. Open a terminal, in it write the following and press [enter]:

sudo blkid

Something like this will appear:

/ dev / sda2: UUID = »066652f1-aee6-4a2a-932a-106cf1174142»TYPE =» ext2 ″
/ dev / sda3: UUID = »222fcc49-0fa1-431e-9210-5233f3bf889b»TYPE =» ext4 ″
/ dev / sda5: UUID = »c7b2785c-6da0-4b8c-a780-cadb01b7227a»TYPE =» ext4 ″
/ dev / sda6: UUID = »f3e50492-204f-4e52-9dfb-4f6bf44a711e»TYPE =» swap »

What I indicate in bold is obviously the UUID, at first you can see the partition to which that UUID belongs (/ Dev / sda5 e.g.).


1. Open a terminal, in it write the following and press [enter]:

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

Something like this will appear:

lrwxrwxrwx 1 root root 10 Nov 14 11:35 222fcc49-0fa1-431e-9210-5233f3bf889b -> ../../sda3
lrwxrwxrwx 1 root root 10 Nov 14 11:35 c7b2785c-6da0-4b8c-a780-cadb01b7227a -> ../../sda5
lrwxrwxrwx 1 root root 10 Nov 14 11:35 f3e50492-204f-4e52-9dfb-4f6bf44a711e -> ../../sda6

What I indicate in bold is obviously the UUID, at the end you can see the partition to which that UUID belongs (../../sda3 e.g.).

And well, nothing more to add ... I'll keep trying to know the UUID of a keyboard ¬¬


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

5 comments, leave yours

Leave a Comment

Your email address will not be published.



  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Computer Guardian said

    Very detailed and clear.

    For contributing something else, indicate that you can also use vol_id to get the uuid of a disk


    1.    KZKG ^ Gaara <"Linux said

      The problem with vol_id is that in Arch it is not available, there is no way to use it, also I tried to use it in Debian Squeeze (one of my servers) and there is no command or option to enable it, that's why I did not put it.

      What distro do you use that you can use vol_id?

      1.    Computer Guardian said

        Uummm… well, you're right; not found in my file (disappeared from udev package)

        In his time he used it in Ubuntu but Debian, as you well mentioned, has "discontinued" it

        1.    KZKG ^ Gaara <"Linux said

          Yep 🙁… I thought to put 3 methods but since this one is no longer possible to use it (like I used it before in Ubuntu), that's why there were only 2 🙁

  2.   Kim said

    Thanks a lot! Very complete 🙂