check uuid using command

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

LEAVE A REPLY

Please enter your comment!
Please enter your name here