How To Find UUID of Storage Devices In CentOS / Redhat 7

UUID is a 128-bit long number represented by 32-bit hexadecimal digits and which are used in software development to uniquely identify the information. UUID is also a property of the disk partition itself. Let’s see how to find UUID of storage devices. We can check UUID of the device using the command in Linux.

Check Out: how to change owner and group of the directory

UUID = cca0c020-aab7-426e-a7a6-5bcfa1a6f14a

How To Find UUID of Storage Devices In Linux:

you can generate random UUID by below command and you need to set this UUID of a storage device in /etc/fstab. if anything goes wrong in this file, So your machine won’t be boot up then you have to check the mounted storage devices in this file.

/dev/mapper/centos-swap   swap   swap    defaults   0 0

you can use the storage device name instead of UUID to define in /etc/fstab. Please make sure to run mount -a command before rebooting the machine. this will show you the error.

cat /proc/sys/kernel/random/uuid

Now there’re many ways to find out this,

ls -l /dev/disk/by-uuid

how to create uuid in linux

Check Out: How To Install NFS Server For File Sharing On Linux

you can get UUID of particular storage devices.

blkid /dev/dm-3

linux device uuid

lsblk -f

uuid in linux

you can also use this command to get the information.

hwinfo –block | grep by-uuid | awk ‘{print $3,$7}’

That’s it.  . check uuid using command

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment