Back to the command reference

blkid

DisksFundamentals In real Linux

Show partition UUIDs and types

Name: blkid = block ID

This command needs a real Linux system; you can practise it in real Linux mode.

Full man page

Description

blkid prints block device attributes: file system type, UUID and label. In /etc/fstab, UUIDs are more reliable than /dev/sdX names, which can change between boots.

Syntax

blkid [OPTION]... [DEVICE]

Common options

-s TAGShow only one tag, e.g. -s UUID
-o FORMATOutput format: value (just the value, for scripts) or list

Examples

  • $ sudo blkid

    UUIDs of all partitions (needed for /etc/fstab)

    Explain

Related