Blkid command on Linux (shows block device attributes) [Basic Guide]

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 
/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="lvm2_member”
/dev/mapper/cl-root: uuid:UUID="lvm2_member” /dev/mapper/cl-root ="602fcf7d-d716-4f5b-aa6b-fb34d85c0169" type="XFS”
/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

Uirá Endy Ribeiro

Uirá Endy Ribeiro is a Software Developer and Cloud Computing Architect with a 23-year career. He has master's degrees in computer science and fifteen IT certifications and is the author of 11 books recognized in the IT world market. He is also Director at Universidade Salgado de Oliveira and Director of the Linux Professional Institute - LPI Director's Board.

Leave a Reply 0

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.

Need help?