Linux でHDDのUUIDを調べる方法

CentOSで確認

1.blkidコマンドで調べる

[root@centosmin ~]# blkid /dev/sda1
/dev/sda1: UUID="a73dfee4-14f3-4500-882d-9ce819ce7df1" TYPE="ext4"

2./dev/...で調べる

[root@centosmin by-uuid]# cd
[root@centosmin ~]# cd /dev/disk/by-uuid/
[root@centosmin by-uuid]# ls -l
total 0
lrwxrwxrwx 1 root root 10 Apr 8 18:54 5dc5f291-67b1-4497-800c-b831ee66a18b -> ../../dm-0
lrwxrwxrwx 1 root root 10 Apr 8 18:54 90338741-d786-4f58-a94a-d80e3d053240 -> ../../dm-1
lrwxrwxrwx 1 root root 10 Apr 8 18:54 a73dfee4-14f3-4500-882d-9ce819ce7df1 -> ../../sda1