commands
lsblk — list block devices
util-linux lsblk reads block-device information. The default columns can vary by release; select explicit columns when inspecting a lab. A list is not proof that a disk is disposable. No disk modification is performed by this invocation.
Formal Syntax & Structure
linux syntaxlinux
lsblk [-o LIST]Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| -o LIST | option | Comma-separated output column names. |
Return Value
text and exit status
Device table on stdout; status 0 on success; nonzero may indicate errors or missing requested devices.
Working Example
Example Snippetlinux
lsblk -o NAME,SIZE,TYPE,MOUNTPOINTS