linux 查看分区UUID的两种方法

时间:2021-08-22 12:13:19

1. sudo blkid

/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/sda1: UUID="**-*-*-*-*-*" TYPE="ntfs" PARTUUID="3b3d7c9a-01"
/dev/sda2: UUID="*-*-*-*-*-**" TYPE="ntfs" PARTUUID="3b3d7c9a-02"
/dev/sda3: UUID="*-*-*-*-*-**" TYPE="ntfs" PARTUUID="3b3d7c9a-03"
/dev/sda5: UUID="*-*-*-*-*-**" TYPE="ext4" PARTUUID="3b3d7c9a-05"
/dev/sda6: UUID="*-*-*-*-*-*" TYPE="swap" PARTUUID="3b3d7c9a-06"
/dev/loop8: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"
/dev/loop10: TYPE="squashfs"
/dev/loop11: TYPE="squashfs"
/dev/loop12: TYPE="squashfs"
/dev/loop13: TYPE="squashfs"
/dev/loop14: TYPE="squashfs"
/dev/loop15: TYPE="squashfs"
/dev/loop16: TYPE="squashfs"
/dev/loop17: TYPE="squashfs"
/dev/loop18: TYPE="squashfs"
/dev/loop19: TYPE="squashfs"
/dev/loop20: TYPE="squashfs"
/dev/loop21: TYPE="squashfs"
/dev/sdb1: UUID="*-*-*-*-*-*" TYPE="ntfs" PARTUUID="83e6d4ce-01"
/dev/sdb3: UUID="*-*-*-*-*-*-*-*-*-*-*-*" TYPE="vfat" PARTUUID="83e6d4ce-03"
/dev/sdb4: UUID="*-*-*-*-*-*" TYPE="ext2" PARTUUID="83e6d4ce-04"
/dev/sdb2: PARTUUID="83e6d4ce-02"

2. ls -l /dev/disk/by-uuid

lrwxrwxrwx 1 root root 10 9月 23 11:55 *-*-*-*-*- -> ../../sda3
lrwxrwxrwx 1 root root 10 9月 23 11:55 *-*-*-*-*- -> ../../sda1
lrwxrwxrwx 1 root root 10 9月 23 11:55 *-*-*-*-*- -> ../../sda6
lrwxrwxrwx 1 root root 10 9月 23 11:55 *-*-*-*-*- -> ../../sda5
lrwxrwxrwx 1 root root 10 9月 23 11:55 *-*-*-*-*- -> ../../sdb1
lrwxrwxrwx 1 root root 10 9月 23 11:55 *-*-*-*-*- -> ../../sdb4
lrwxrwxrwx 1 root root 10 9月 23 11:55 *-*-*-*-*- -> ../../sda2
lrwxrwxrwx 1 root root 10 9月 23 11:55 *-*-*-*-*--*-*-*-*-*- -> ../../sdb3

3. GParted

比较浪费时间

右键-信息