Skip to content

Linux blkid Guide

Mattscreative edited this page Dec 5, 2025 · 2 revisions

Linux blkid Guide

Complete beginner-friendly guide to blkid on Linux, covering Arch Linux, CachyOS, and other distributions including block device identification, UUID lookup, and filesystem information.


Table of Contents

  1. Understanding blkid
  2. blkid Basics
  3. Device Information
  4. UUID and Labels
  5. Troubleshooting

Understanding blkid

What is blkid?

blkid prints block device attributes.

Uses:

  • Device info: Get block device information
  • UUID lookup: Find device UUIDs
  • Filesystem info: Get filesystem details
  • Device identification: Identify devices

Why it matters:

  • Device identification: Identify devices
  • UUID lookup: Find UUIDs for fstab
  • Filesystem info: Get filesystem details

blkid Basics

List All Devices

Basic usage:

# List all block devices
sudo blkid

# Shows all devices with info

Specific Device

Device info:

# Specific device
sudo blkid /dev/sda1

# Shows device information

Device Information

UUID Only

Get UUID:

# UUID only
sudo blkid -s UUID /dev/sda1

# -s = show (specific field)

Label Only

Get label:

# Label only
sudo blkid -s LABEL /dev/sda1

# Shows filesystem label

UUID and Labels

All Fields

Complete info:

# All information
sudo blkid /dev/sda1

# Shows:
# UUID, LABEL, TYPE, PARTUUID, etc.

Export Format

Script-friendly:

# Export format
sudo blkid -p /dev/sda1

# -p = probe (re-reads device)

Troubleshooting

blkid Not Found

Check installation:

# Check blkid
which blkid

# Usually in util-linux
# Install if missing
sudo pacman -S util-linux

Summary

This guide covered blkid usage, device identification, and filesystem information for Arch Linux, CachyOS, and other distributions.


Next Steps


This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.

Clone this wiki locally