blkid
Quick Reference
Command Name:
blkid
Category:
disk management
Platform:
linux
Basic Usage:
Common Use Cases
- 1
Device identification
Identify block devices and their filesystem types
- 2
System administration
Manage and configure storage devices
- 3
Troubleshooting
Diagnose storage device issues
- 4
Device mapping
Map and identify storage devices in the system
Syntax
blkid [options] [device...]
Options
Option | Description |
---|---|
-c, --cache | Read from or write to the specified cache file (default: /etc/blkid.tab) |
-g, --garbage-collect | Garbage collect the blkid cache |
-h, --help | Display help information and exit |
-i, --info | Display block device information in name=value format |
-k, --list-filesystems | List all known filesystems/RAIDs and exit |
-l, --list-one | List one device that matches the search parameter |
-L, --label | Look up the device that uses this filesystem label |
-n, --match-types | Restrict probing functions to the specified list of filesystem types |
-o, --output | Specify output format (full, value, list, device, udev, export) |
-p, --probe | Low-level probe of block devices (bypass the cache) |
-s, --match-tag | Show only the tags that match the specified names |
-t, --match-token | Search for block devices with the specified NAME=value |
-U, --uuid | Look up the device that uses this UUID |
-v, --version | Display version information and exit |
Examples
How to Use These Examples
The examples below show common ways to use the blkid
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
Basic Examples:
blkid
blkid /dev/sda1
blkid -s UUID /dev/sda1
blkid -o value -s UUID /dev/sda1
blkid -t TYPE=ext4