knowledge/technology/applications/cli/system/lsblk.md
2024-03-08 22:22:49 +01:00

92 lines
No EOL
7.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
obj: application
repo: git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git
---
# lsblk
List block devices
Usage: `lsblk [options] [device...]`
## Options
| Option | Description |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `-A, --noempty` | Dont print empty devices |
| `-a, --all` | Disable all built-in filters and list all empty devices and RAM disk devices too |
| `-f, --fs` | Output info about filesystems. This option is equivalent to `-o NAME,FSTYPE,FSVER,LABEL,UUID,FSAVAIL,FSUSE%,MOUNTPOINTS` |
| `-J, --json` | Use JSON output format |
| `-l, --list` | Produce output in the form of a list |
| `-N, --nvme` | Output info about NVMe devices only |
| `-o, --output list` | Specify which output columns to print |
| `-p, --paths` | Print full device paths |
## Output Columns
| Output | 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](../../../linux/UUID.md) |
| PARTTYPENAME | partition type name |
| PARTUUID | partition [UUID](../../../linux/UUID.md) |
| 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](../../../linux/UUID.md)) |
| 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](../../../linux/UUID.md) |
| 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 |