1. 最簡單的方式是直接執行blkid, 會列出目前連接到系統上所有磁碟的partition UUID, 檔案系統以及label, 例如:
$ blkid
/dev/loop0: TYPE="squashfs"
/dev/sda1: UUID="4C54A5A254A58EF0" LABEL="VAIO" TYPE="ntfs"
/dev/sda5: UUID="4CFCC181FCC165B4" TYPE="ntfs"
/dev/sda6: UUID="a5050769-1c80-4e7c-8b7c-da810624d910" TYPE="ext3"
/dev/sda7: UUID="8c28803c-3390-46d7-bb90-fd9a83c0bff3" TYPE="swap"
/dev/sda8: UUID="95206ddf-7ffd-4ddb-8ced-631b5df70b26" TYPE="ext3"
2. 另外也可以執行sudo vol_id
$ sudo vol_id /dev/sda1
ID_FS_USAGE=filesystem
ID_FS_TYPE=ntfs
ID_FS_VERSION=3.1
ID_FS_UUID=4CFCC181FCC165B4
ID_FS_UUID_ENC=4CFCC181FCC165B4
ID_FS_LABEL=
ID_FS_LABEL_ENC=
沒有留言:
張貼留言