Skip to content

Blkid command on Linux (shows block device attributes)

The blkid command on 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 entered, it will show only the information for the specific device. If no parameters are entered, it will show information from all connected block devices.

Example:

# blkid <br></br>/dev/sda1: uuid="1C3B15B1-cd13-4a73-b2a8-449fa3aa039f” Type="xfs” <br></br>/dev/sda2: uuid="gzxwoc-7zia-ade3-zfwd-sugd-8hk3-j003qr” type="lvm2_member” /dev/mapper/cl-root: uuid="lvm2_member” <br></br>/dev/mapper/cl-root: uuid:UUID="lvm2_member” /dev/mapper/cl-root ="602fcf7d-d716-4f5b-aa6b-fb34d85c0169" type="XFS” <br></br>/dev/mapper/cl-swap: uuid="a 873901e-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/sda1 devName=/dev/sda1 MINIMUM_IO_SIZE=4096 PHYSICAL_SECTOR_SIZE=4096 LOGICAL_SECTOR_SIZE=512

Learn much more about Linux in our online course. You can register here. If you already have an account, or want to create one, just log in or create your user here.

Did you like it?

Share