-
-
Notifications
You must be signed in to change notification settings - Fork 1
Linux lsblk Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to lsblk on Linux, covering Arch Linux, CachyOS, and other distributions including listing block devices, device information, and disk management.
lsblk lists block devices.
Uses:
- List disks: See all storage devices
- Device info: Get device details
- Partition info: View partitions
- Mount info: See mount points
Why it matters:
- Disk management: Identify devices
- Partitioning: Plan disk layout
- Troubleshooting: Diagnose disk issues
Basic usage:
# List all block devices
lsblk
# Tree format (default)
lsblkColumns:
- NAME: Device name
- MAJ:MIN: Major/minor numbers
- RM: Removable
- SIZE: Device size
- RO: Read-only
- TYPE: Device type
- MOUNTPOINT: Mount point
Different formats:
# List format
lsblk -l
# JSON format
lsblk -J
# Raw format
lsblk -rFilter output:
# Show only disks
lsblk -d
# Show specific device
lsblk /dev/sda
# Exclude devices
lsblk -e 7More details:
# Show filesystem info
lsblk -f
# Show model and serial
lsblk -o NAME,SIZE,MODEL,SERIAL
# Show all columns
lsblk -o NAME,SIZE,TYPE,MOUNTPOINT,FSTYPE,UUIDHierarchical view:
# Tree format
lsblk
# ASCII tree
lsblk -aCheck system:
# List all devices
lsblk -a
# Check /dev
ls -la /dev/sd*
# Check dmesg
dmesg | grep -i diskThis guide covered lsblk usage, device listing, and disk information for Arch Linux, CachyOS, and other distributions.
- Disk Utilities - Disk tools
- Filesystem Management - Filesystem setup
- mount Guide - Mounting devices
-
lsblk Documentation:
man lsblk
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.