LSBLK
The LSBLK command outputs information about connected devices/partitions.
For each block device lsblk displays attributes such as its UUID, TYPE, and LABEL. A block device may be a HDD, SSD, or a USB drive. LSBLK can also determine the content type of a block device (file system, swap).
LSBLK is part of the standard Util-Linux package installed with most distributions:
sudo pacman -S util-linux
LSBLK Options
Command options
Command Options modify the behaviour of lsblk
.
Option | Description |
---|---|
-A , --noempty |
don’t print empty devices |
-D , --discard |
print discard capabilities |
-E , --dedup <column> |
de-duplicate output by column |
-I , --include <list> |
show only devices with specified major numbers |
-J , --json |
use JSON output format |
-M , --merge |
group parents of sub-trees (usable for RAIDs, Multi-path) |
-O , --output-all |
output all columns |
-P , --pairs |
use KEY=“value” output format |
-S , --scsi |
output info about SCSI devices |
-N , --nvme |
output info about NVMe devices |
-v , --virtio |
output info about virtio devices |
-T , --tree[=<column>] |
use tree format output |
-a , --all |
print all devices, including empty |
-b , --bytes |
print SIZE in bytes rather than in human readable format |
-d , --nodeps |
don’t print slaves or holders |
-e , --exclude <list> |
exclude devices by major number (default: RAM disks) |
-f , --fs |
output info about filesystems |
-i , --ascii |
use ASCII characters only |
-l , --list |
use list format output |
-m , --perms |
output info about permissions |
-n , --noheadings |
don’t print headings |
-o , --output <list> |
output columns |
-p , --paths |
print complete device path |
-r , --raw |
use raw output format |
-s , --inverse |
inverse dependencies |
-t , --topology |
output info about topology |
-w , --width <num> |
specifies output width as number of characters |
-x , --sort <column> |
sort output by column |
-y , --shell |
use column names to be usable as shell variable identifiers |
-z , --zoned |
print zone related information |
--sysroot <dir> |
use specified directory as system root |
-h , --help |
display this help |
-V , --version |
display version |
Output columns
LIST OF LSBLK OUTPUT COLUMNS
Column | Description |
---|---|
ALIGNMENT | alignment offset |
ID-LINK | the shortest udev /dev/disk/by-id link name |
ID | udev ID (based on ID-LINK) |
DISC-ALN | discard alignment offset |
DAX | dax-capable device |
DISC-GRAN | discard granularity |
DISK-SEQ | disk sequence number |
DISC-MAX | discard max bytes |
DISC-ZERO | discard zeroes data |
FSAVAIL | filesystem size available |
FSROOTS | mounted filesystem roots |
FSSIZE | filesystem size |
FSTYPE | filesystem type |
FSUSED | filesystem size used |
FSUSE% | filesystem use percentage |
FSVER | filesystem version |
GROUP | group name |
HCTL | Host:Channel:Target:Lun for SCSI |
HOTPLUG | removable or hotplug device (usb, pcmcia, …) |
KNAME | internal kernel device name |
LABEL | filesystem LABEL |
LOG-SEC | logical sector size |
MAJ:MIN | major:minor device number |
MIN-IO | minimum I/O size |
MODE | device node permissions |
MODEL | device identifier |
MQ | device queues |
NAME | device name |
OPT-IO | optimal I/O size |
OWNER | user name |
PARTFLAGS | partition flags |
PARTLABEL | partition LABEL |
PARTN | partition number as read from the partition table |
PARTTYPE | partition type code or UUID |
PARTTYPENAME | partition type name |
PARTUUID | partition UUID |
PATH | path to the device node |
PHY-SEC | physical sector size |
PKNAME | internal parent kernel device name |
PTTYPE | partition table type |
PTUUID | partition table identifier (usually UUID) |
RA | read-ahead of the device |
RAND | adds randomness |
REV | device revision |
RM | removable device |
RO | read-only device |
ROTA | rotational device |
RQ-SIZE | request queue size |
SCHED | I/O scheduler name |
SERIAL | disk serial number |
SIZE | size of the device |
START | partition start offset |
STATE | state of the device |
SUBSYSTEMS | de-duplicated chain of subsystems |
MOUNTPOINT | where the device is mounted |
MOUNTPOINTS | all locations where device is mounted |
TRAN | device transport type |
TYPE | device type |
UUID | filesystem UUID |
VENDOR | device vendor |
WSAME | write same max bytes |
WWN | unique storage identifier |
ZONED | zone model |
ZONE-SZ | zone size |
ZONE-WGRAN | zone write granularity |
ZONE-APP | zone append max bytes |
ZONE-NR | number of zones |
ZONE-OMAX | maximum number of open zones |
ZONE-AMAX | maximum number of active zones |
LSBLK commands in Linux
lsblk
The lsblk
command (without arguments) is almost identical to lsblk -a
; except that using the -a
option also outputs details of empty devices without either partitions or mount points.
sudo lsblk
/dev/sdXY
Display information about a single device
lsblk /dev/sdXY
Example output:
[nix@nix ~]$ sudo lsblk /dev/sdb3
/dev/sdb3: LABEL="WINDATA" BLOCK_SIZE="512" UUID="5AEA245202EA25E1" TYPE="ntfs" PARTLABEL="WINDATA_VM" PARTUUID="76467445-967b-463c-865f-a0640117976f"
Output examples
-A
, --noempty
Don’t print empty devices
lsblk -A
-D
, --discard
Print discard capabilities
lsblk -D
Example output:
[nix@nix ~]$ lsblk -D
NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
sda 0 512B 2G 0
├─sda1 0 512B 2G 0
├─sda2 0 512B 2G 0
├─sda3 0 512B 2G 0
└─sda4 0 512B 2G 0
sdd 0 0B 0B 0
├─sdb1 0 0B 0B 0
├─sdb2 0 0B 0B 0
└─sdb3 0 0B 0B 0
sdf 0 0B 0B 0
├─sdc1 0 0B 0B 0
└─sdc3 0 0B 0B 0
sr0 0 0B 0B 0
-E
, --dedup <column>
De-duplicate output by column (NAME
, SIZE
, TYPE
)
lsblk -E TYPE
Example output:
[nix@nix ~]$ lsblk -E TYPE
NAME
MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sr0 11:0 1 1024M 0 rom
-I
, --include <list>
Show only devices with specified major numbers (eg: 8
disk, 11
optical)
lsblk -I 11
Example output:
[nix@nix ~]$lsblk -I 11
NAME
MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sr0 11:0 1 1024M 0 rom
-J
, --json
Use JSON output format
lsblk -J
Example output:
[nix@nix ~]$ lsblk -J
{
"blockdevices": [
{
"name": "sda",
"maj:min": "8:0",
"rm": false,
"size": "465.8G",
"ro": false,
"type": "disk",
"mountpoints": [
null
],
"children": [
{
"name": "sda1",
"maj:min": "8:1",
"rm": false,
"size": "300M",
"ro": false,
"type": "part",
"mountpoints": [
"/boot/efi"
]
{
"name": "sda2",
"maj:min": "8:2",
"rm": false,
"size": "64G",
"ro": false,
"type": "part",
"mountpoints": [
"[SWAP]"
]
},{
"name": "sda3",
"maj:min": "8:3",
"rm": false,
"size": "100G",
"ro": false,
"type": "part",
"mountpoints": [
"/"
]
},{
"name": "sda4",
"maj:min": "8:4",
"rm": false,
"size": "301.5G",
"ro": false,
"type": "part",
"mountpoints": [
"/home"
]
}
]
},{
"name": "sdb",
"maj:min": "8:16",
"rm": false,
"size": "3.6T",
"ro": false,
"type": "disk",
"mountpoints": [
null
],
"children": [
},{
"name": "sdb1",
"maj:min": "8:17",
"rm": false,
"size": "200M",
"ro": false,
"type": "part",
"mountpoints": [
null
]
{
"name": "sdb2",
"maj:min": "8:18",
"rm": false,
"size": "931.5G",
"ro": false,
"type": "part",
"mountpoints": [
"/media/mandata"
]
},{
"name": "sdb3",
"maj:min": "8:19",
"rm": false,
"size": "931.5G",
"ro": false,
"type": "part",
"mountpoints": [
"/media/windata"
]
}
]
},{
"name": "sdc",
"maj:min": "8:32",
"rm": false,
"size": "2.7T",
"ro": false,
"type": "disk",
"mountpoints": [
null
],
"children": [
{
"name": "sdc1",
"maj:min": "8:33",
"rm": false,
"size": "200M",
"ro": false,
"type": "part",
"mountpoints": [
null
]
},{
"name": "sdc2",
"maj:min": "8:34",
"rm": false,
"size": "2.7T",
"ro": false,
"type": "part",
"mountpoints": [
"/run/media/nix/usbdata"
]
}
]
},{
"name": "sr0",
"maj:min": "11:0",
"rm": true,
"size": "1024M",
"ro": false,
"type": "rom",
"mountpoints": [
null
]
}
]
}
-M
, --merge
Group parents of sub-trees (usable for RAIDs, Multi-path)
lsblk -M
-O
, --output-all
Output all columns
- It makes better sense to redirect this output to a file.
lsblk -O > ~/output.txt
Example output:
[nix@nix ~]$ lsblk -O > ~/output.txt
# OUTPUT REDIRECTED TO FILE
-P
, --pairs
Use KEY=“value” output format
lsblk -P
Example output:
[nix@nix ~]$ lsblk -P
NAME="sda" MAJ:MIN="8:0" RM="0" SIZE="465.8G" RO="0" TYPE="disk" MOUNTPOINTS=""
NAME="sda1" MAJ:MIN="8:1" RM="0" SIZE="465.8G" RO="0" TYPE="part" MOUNTPOINTS="/boot/efi"
NAME="sda2" MAJ:MIN="8:2" RM="0" SIZE="465.8G" RO="0" TYPE="part" MOUNTPOINTS=""
NAME="sda3" MAJ:MIN="8:3" RM="0" SIZE="465.8G" RO="0" TYPE="part" MOUNTPOINTS="/"
NAME="sda4" MAJ:MIN="8:4" RM="0" SIZE="465.8G" RO="0" TYPE="part" MOUNTPOINTS="/home"
NAME="sdb" MAJ:MIN="8:16" RM="0" SIZE="3.6T" RO="0" TYPE="disk" MOUNTPOINTS=""
NAME="sdb1" MAJ:MIN="8:17" RM="0" SIZE="3.6T" RO="0" TYPE="part" MOUNTPOINTS=""
NAME="sdb2" MAJ:MIN="8:18" RM="0" SIZE="3.6T" RO="0" TYPE="part" MOUNTPOINTS="/media/mandata"
NAME="sdb3" MAJ:MIN="8:19" RM="0" SIZE="3.6T" RO="0" TYPE="part" MOUNTPOINTS="/media/windata"
NAME="sdc" MAJ:MIN="8:32" RM="0" SIZE="2.7T" RO="0" TYPE="disk" MOUNTPOINTS=""
NAME="sdc1" MAJ:MIN="8:33" RM="0" SIZE="2.7T" RO="0" TYPE="part" MOUNTPOINTS=""
NAME="sdc2" MAJ:MIN="8:34" RM="0" SIZE="2.7T" RO="0" TYPE="part" MOUNTPOINTS="/run/media/nix/usbdata"
NAME="sro" MAJ:MIN="11:0" RM="0" SIZE="1024M" RO="0" TYPE="rom" MOUNTPOINTS=""
-S
, --scsi
Output info about SCSI devices
lsblk -S
Example output:
[nix@nix ~]$ lsblk -S
NAME HCTL TYPE VENDOR MODEL REV SERIAL TRAN
sda 0:0:0:0 disk ATA Samsung SSD 860 4B6Q sata
sdb 1:0:0:0 disk ATA ST4000DM005-2DP1 0001 sata
sdc 2:0:0:0 disk Seagate Expansion 0710 usb
sr0 3:0:0:0 rom ATAPI iHBS312 2 PL15 sata
-N
, --nvme
Output info about NVMe devices
lsblk -N
-v
, --virtio
Output info about Virt-IO devices
lsblk -v
-T
, --tree[=<column>]
Use tree format output
lsblk -T
-a
, --all
Print all devices, including empty
lsblk -a
Example output:
[nix@nix ~]$ lsblk -a
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 465.8G 0 disk
├─sda1 8:1 0 300M 0 part /boot/efi
├─sda2 8:2 0 64G 0 part [SWAP]
├─sda3 8:3 0 100G 0 part /
└─sda4 8:4 0 301.5G 0 part /home
sdb 8:16 0 3.6T 0 disk
├─sdb1 8:17 0 200M 0 part
├─sdb2 8:18 0 931.5G 0 part /media/mandata
└─sdb3 8:19 0 931.5G 0 part /media/windata
sdc 8:32 0 2.7T 0 disk
├─sdc1 8:33 0 200M 0 part
└─sdc2 8:34 0 2.7T 0 part /run/media/nix/usbdata
sr0 11:0 1 1024M 0 rom
-b
, --bytes
Print SIZE in bytes rather than in human readable format
lsblk -b
Example output:
[nix@nix ~]$ lsblk -b
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 500107862016 0 disk
├─sda1 8:1 0 314572800 0 part /boot/efi
├─sda2 8:2 0 68719476736 0 part [SWAP]
├─sda3 8:3 0 107374182400 0 part /
└─sda4 8:4 0 323698564608 0 part /home
sdb 8:16 0 4000787030016 0 disk
├─sdb1 8:17 0 209715200 0 part
├─sdb2 8:18 0 1000194703360 0 part /media/mandata
└─sdb3 8:19 0 1000194703360 0 part /media/windata
sdc 8:32 0 3000592981504 0 disk
├─sdc1 8:33 0 209715200 0 part
└─sdc2 8:34 0 3000591450112 0 part /run/media/nix/usbdata
sr0 11:0 1 1073741312 0 rom
-d
, --nodeps
Don’t print slaves or holders
lsblk -d
Example output:
[nix@nix ~]$ lsblk -d
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 465.8G 0 disk
sdb 8:16 0 3.6T 0 disk
sdc 8:32 0 2.7T 0 disk
sr0 11:0 1 1024M 0 rom
-e
, --exclude <list>
Exclude devices by major number (default: RAM disks)
lsblk -e 8
Example output:
[nix@nix ~]$ lsblk -e 8
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sr0 11:0 1 1024M 0 rom
-f
, --fs
Output info about filesystems
- Requires elevated privileges to show UUIDs.
# Output automatically sorted by NAME
sudo lsblk -f
Example output:
[nix@nix ~]$ sudo lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1 vfat ESP_MAN 2B21-157F 120.1M 39% /boot/efi
├─sda2 swap swap 7175d2c1-2ffd-4d8a-b6f8-7140f4d32d23 [SWAP]
├─sda4 ext4 MANJARO 14684cf5-fa49-45c2-bba6-87902b4a8130 38.8G 55% /
└─sda3 ext4 MANHOME 1bf95423-e9de-435d-b739-4a270d2e5079 113G 57% /home
sdb
├─sdb1 vfat ESP_EXT B340-10B9
├─sdb2 ext4 MANDATA 7fac5ef5-c05e-4d9e-b937-fc1680e8757d 138.3G 80% /media/mandata
└─sdb3 ntfs WINDATA 1B94413F29A0CD20 331.6G 64% /media/windata
sdc
├─sdc1 vfat ESP_USB 52C6-B274 [none]
└─sdc2 ntfs USBDATA BDDC37ED7B5444C0 /run/media/nix/usbdata
-i
, --ascii
Use ASCII characters only
lsblk -i
Example output:
[nix@nix ~]$ lsblk -i
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 465.8G 0 disk
|-sda1 8:1 0 300M 0 part /boot/efi
|-sda2 8:2 0 64G 0 part [SWAP]
|-sda3 8:3 0 100G 0 part /
`-sda4 8:4 0 301.5G 0 part /home
sdb 8:16 0 3.6T 0 disk
|-sdb1 8:17 0 200M 0 part
|-sdb2 8:18 0 931.5G 0 part /media/mandata
`-sdb3 8:19 0 931.5G 0 part /media/windata
sdc 8:32 0 2.7T 0 disk
|-sdc1 8:33 0 200M 0 part
`-sdc2 8:34 0 2.7T 0 part /run/media/nix/usbdata
sr0 11:0 1 1024M 0 rom
-l
, --list
Use list format output
lsblk -l
Example output:
[nix@nix ~]$ lsblk -l
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 465.8G 0 disk
sda1 8:1 0 300M 0 part /boot/efi
sda2 8:2 0 64G 0 part [SWAP]
sda3 8:3 0 100G 0 part /
sda4 8:4 0 301.5G 0 part /home
sdb 8:16 0 3.6T 0 disk
sdb1 8:17 0 200M 0 part
sdb2 8:18 0 931.5G 0 part /media/mandata
sdb3 8:19 0 931.5G 0 part /media/windata
sdc 8:32 0 2.7T 0 disk
sdc1 8:33 0 200M 0 part
sdc2 8:34 0 2.7T 0 part /run/media/nix/usbdata
sr0 11:0 1 1024M 0 rom
-m
, --perms
Output info about permissions
lsblk -m
Example output:
[nix@nix ~]$ lsblk -m
NAME SIZE OWNER GROUP MODE
sda 465.8G root disk brw-rw----
├─sda1 300M root disk brw-rw----
├─sda2 64G root disk brw-rw----
├─sda3 100G root disk brw-rw----
└─sda4 301.5G root disk brw-rw----
sdb 3.6T root disk brw-rw----
├─sdb1 200M root disk brw-rw----
├─sdb2 931.5G root disk brw-rw----
└─sdb3 931.5G root disk brw-rw----
sdc 2.7T root disk brw-rw----
├─sdc1 200M root disk brw-rw----
└─sdc2 2.7T root disk brw-rw----
sr0 1024M root optical brw-rw----
-n
, --noheadings
Don’t print headings
lsblk -n
-o
, --output <list>
Output columns: -o <specify columns>
- Requires elevated privileges to show UUIDs
sudo lsblk -o NAME,FSTYPE,TYPE,UUID,LABEL,MOUNTPOINT
Example output:
[nix@nix ~]$ sudo lsblk -o NAME,TYPE,FSTYPE,UUID,LABEL,MOUNTPOINT
NAME TYPE FSTYPE UUID LABEL MOUNTPOINT
sda disk
├─sda1 part vfat 2B21-157F ESP_MAN /boot/efi
├─sda2 part swap 7175d2c1-2ffd-4d8a-b6f8-7140f4d32d23 swap [SWAP]
├─sda3 part ext4 14684cf5-fa49-45c2-bba6-87902b4a8130 MANJARO /
└─sda4 part ext4 1bf95423-e9de-435d-b739-4a270d2e5079 MANHOME /home
sdb disk
├─sdb1 part vfat B340-10B9 ESP_EXT
├─sdb2 part ext4 7fac5ef5-c05e-4d9e-b937-fc1680e8757d MANDATA /media/mandata
└─sdb3 part ntfs 1B94413F29A0CD20 WINDATA /media/windata
sdc disk
├─sdc1 part vfat 52C6-B274 ESP_USB [none]
└─sdc2 part ntfs BDDC37ED7B5444C0 USBDATA /run/media/nix/usbdata
-p
, --paths
Print complete device path
lsblk -p
Example output:
[nix@nix ~]$ lsblk -p
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
/dev/sda 8:0 0 465.8G 0 disk
├─/dev/sda1 8:1 0 300M 0 part /boot/efi
├─/dev/sda2 8:2 0 64G 0 part [SWAP]
├─/dev/sda3 8:3 0 100G 0 part /
└─/dev/sda4 8:4 0 301.5G 0 part /home
/dev/sdb 8:16 0 3.6T 0 disk
├─/dev/sdb1 8:17 0 200M 0 part
├─/dev/sdb2 8:18 0 931.5G 0 part /media/mandata
└─/dev/sdb3 8:19 0 931.5G 0 part /media/windata
/dev/sdc 8:32 0 2.7T 0 disk
├─/dev/sdc1 8:33 0 200M 0 part
└─/dev/sdc2 8:34 0 2.7T 0 part /run/media/nix/usbdata
/dev/sr0 11:0 1 1024M 0 rom
-r
, --raw
Use raw output format
lsblk -r
Example output:
[nix@nix ~]$ lsblk -r
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 465.8G 0 disk
sda1 8:1 0 300M 0 part /boot/efi
sda2 8:2 0 64G 0 part [SWAP]
sda3 8:3 0 100G 0 part /
sda4 8:4 0 301.5G 0 part /home
sdb 8:16 0 3.6T 0 disk
sdb1 8:17 0 200M 0 part
sdb2 8:18 0 931.5G 0 part /media/mandata
sdb3 8:19 0 931.5G 0 part /media/windata
sdc 8:32 0 2.7T 0 disk
sdc1 8:33 0 200M 0 part
sdc2 8:34 0 2.7T 0 part /run/media/nix/usbdata
sr0 11:0 1 1024M 0 rom
-s
, --inverse
Inverse dependencies
lsblk -s
Example output:
[nix@nix ~]$ lsblk -s
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda1 8:1 0 300M 0 part /boot/efi
└─sda 8:0 0 465.8G 0 disk
sda2 8:2 0 64G 0 part [SWAP]
└─sda 8:0 0 465.8G 0 disk
sda3 8:3 0 100G 0 part /
└─sda 8:0 0 465.8G 0 disk
sda4 8:4 0 301.5G 0 part /home
└─sda 8:0 0 465.8G 0 disk
sdb1 8:17 0 200M 0 part
└─sdb 8:16 0 3.6T 0 disk
sdb2 8:18 0 931.5G 0 part /media/mandata
└─sdb 8:16 0 3.6T 0 disk
sdb3 8:19 0 931.5G 0 part /media/windata
└─sdb 8:16 0 3.6T 0 disk
sdc1 8:33 0 200M 0 part
└─sdc 8:32 0 2.7T 0 disk
sdc2 8:34 0 2.7T 0 part /run/media/nix/usbdata
└─sdc 8:32 0 2.7T 0 disk
sr0 11:0 1 1024M 0 rom
-t
, --topology
Output info about topology
lsblk -t
Example output:
[nix@nix ~]$ lsblk -t
NAME ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC ROTA SCHED RQ-SIZE RA WSAME
sda 0 512 0 512 512 1 mq-deadline 64 128 0B
├─sda1 0 512 0 512 512 1 mq-deadline 64 128 0B
├─sda2 0 512 0 512 512 1 mq-deadline 64 128 0B
├─sda3 0 512 0 512 512 1 mq-deadline 64 128 0B
└─sda4 0 512 0 512 512 1 mq-deadline 64 128 0B
sdb 0 4096 0 4096 512 1 mq-deadline 64 128 0B
├─sdb1 0 4096 0 4096 512 1 mq-deadline 64 128 0B
├─sdb2 0 4096 0 4096 512 1 mq-deadline 64 128 0B
└─sdb3 0 4096 0 4096 512 1 mq-deadline 64 128 0B
sdc 0 512 0 512 512 1 mq-deadline 64 128 0B
├─sdc1 0 512 0 512 512 1 mq-deadline 64 128 0B
└─sdc2 0 512 0 512 512 1 mq-deadline 64 128 0B
sr0 0 512 0 512 512 1 mq-deadline 64 128 0B
-w
, --width <num>
Specifies output width as number of characters (48)
lsblk -w 48
-x
, --sort <column>
Sort output by column
- Example sorted by
SIZE
lsblk -x SIZE
Example output:
[nix@nix ~]$ lsblk -x SIZE
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sdb1 8:17 0 200M 0 part
sdc1 8:32 0 200M 0 part
sda1 8:1 0 300M 0 part /boot/efi
sr0 11:0 1 1024M 0 rom
sda2 8:2 0 64G 0 part [SWAP]
sda3 8:3 0 100G 0 part /
sda4 8:4 0 301.5G 0 part /home
sda 8:0 0 465.8G 0 disk
sdb3 8:18 0 931.5G 0 part /media/mandata
sdb4 8:19 0 931.5G 0 part /media/windata
sdb 8:16 0 3.6T 0 disk
sdc2 8:34 0 2.7T 0 part
sdc 8:33 0 2.7T 0 disk
-y
, --shell
Use column names to be usable as shell variable identifiers
lsblk -y
-z
, --zoned
Print zone related information
lsblk -z
Example output:
[nix@nix ~]$ lsblk -z
NAME ZONED ZONE-SZ ZONE-NR ZONE-AMAX ZONE-OMAX ZONE-APP ZONE-WGRAN
sda none 0B 0 0 0 0B 0B
├─sda1 none 0B 0 0 0 0B 0B
├─sda2 none 0B 0 0 0 0B 0B
├─sda3 none 0B 0 0 0 0B 0B
└─sda4 none 0B 0 0 0 0B 0B
sdb none 0B 0 0 0 0B 0B
├─sdb1 none 0B 0 0 0 0B 0B
├─sdb2 none 0B 0 0 0 0B 0B
└─sdb3 none 0B 0 0 0 0B 0B
sdc none 0B 0 0 0 0B 0B
├─sdc1 none 0B 0 0 0 0B 0B
└─sdc2 none 0B 0 0 0 0B 0B
sr0 none 0B 0 0 0 0B 0B
--sysroot <dir>
Use specified directory as system root
lsblk --sysroot [dir]
-h
, --help
Display help information
lsblk -h
Example output:
[nix@nix ~]$ lsblk -h
# DISPLAYS HELP/USAGE INFORMATION
-V
, --version
Display version information
lsblk -V
Example output:
[nix@nix ~]$ lsblk -V
lsblk from util-linux 2.39.2
See also: man lsblk; man lsblk.
Contributors: