blkid Command in Linux: View UUID and Filesystem Type of Disks
Linuxcommands
The blkid command in Linux shows what type of content a block device (disks) contains and its attributes such as device name, and other metadata.
If a device is specified, it will only show information for that particular device. If no parameter is specified, it will show information for all connected block devices.
Example:
# blkid/dev/sda1: UUID="1c3b15b1-cd13-4a73-b2a8-449fa3aa039f" TYPE="xfs" /dev/sda2: UUID="GZXwoc-7Zia-AdE3-ZFwD-SUgd-8hK3-j003qr" TYPE="LVM2_member" /dev/mapper/cl-root: UUID="602fcf7d-d716-4f5b-aa6b-fb34d85a0169" TYPE="xfs" /dev/mapper/cl-swap: UUID="a873901e-5b33-4c78-84f5-e9eeadd9fba3" TYPE="swap" /dev/mapper/cl-home: UUID="fcbdceb1-9053-460b-908c-f7913f91dbe6" TYPE="xfs"
It also shows information about the disk topology:
$ sudo blkid -i /dev/sda1DEVNAME=/dev/sda1MINIMUM_IO_SIZE=4096PHYSICAL_SECTOR_SIZE=4096LOGICAL_SECTOR_SIZE=512
Learn much more about Linux in our online course. You can enroll here. If you already have an account, or want to create one, just log in or create your user here.
Liked it? Share
That was just one piece. The course teaches the whole path — from your first command to exam day.