2016-01-05 20:41:55 +05:30
|
|
|
# lsblk
|
|
|
|
|
2016-01-13 12:04:46 +01:00
|
|
|
> Lists information about devices.
|
2021-08-16 07:34:01 -03:00
|
|
|
> More information: <https://manned.org/lsblk>.
|
2016-01-05 20:41:55 +05:30
|
|
|
|
2016-01-13 12:04:46 +01:00
|
|
|
- List all storage devices in a tree-like format:
|
2016-01-05 20:41:55 +05:30
|
|
|
|
|
|
|
`lsblk`
|
|
|
|
|
2016-01-13 12:04:46 +01:00
|
|
|
- Also list empty devices:
|
2016-01-05 20:41:55 +05:30
|
|
|
|
2025-03-12 21:05:58 +02:00
|
|
|
`lsblk {{[-a|--all]}}`
|
2016-01-05 20:41:55 +05:30
|
|
|
|
2016-01-13 12:04:46 +01:00
|
|
|
- Print the SIZE column in bytes rather than in a human-readable format:
|
2016-01-05 20:41:55 +05:30
|
|
|
|
2025-03-12 21:05:58 +02:00
|
|
|
`lsblk {{[-b|--bytes]}}`
|
2016-01-05 20:41:55 +05:30
|
|
|
|
2016-01-13 12:04:46 +01:00
|
|
|
- Output info about filesystems:
|
2016-01-05 20:41:55 +05:30
|
|
|
|
2025-03-12 21:05:58 +02:00
|
|
|
`lsblk {{[-f|--fs]}}`
|
2016-01-05 20:41:55 +05:30
|
|
|
|
2016-01-13 12:04:46 +01:00
|
|
|
- Use ASCII characters for tree formatting:
|
2016-01-05 20:41:55 +05:30
|
|
|
|
2025-03-12 21:05:58 +02:00
|
|
|
`lsblk {{[-i|--ascii]}}`
|
2016-01-05 20:41:55 +05:30
|
|
|
|
2016-01-13 12:04:46 +01:00
|
|
|
- Output info about block-device topology:
|
2016-01-05 20:41:55 +05:30
|
|
|
|
2025-03-12 21:05:58 +02:00
|
|
|
`lsblk {{[-t|--topology]}}`
|
2020-06-03 21:31:47 +08:00
|
|
|
|
|
|
|
- Exclude the devices specified by the comma-separated list of major device numbers:
|
|
|
|
|
2025-03-12 21:05:58 +02:00
|
|
|
`lsblk {{[-e|--exclude]}} {{1,7,...}}`
|
2020-12-22 05:59:32 -06:00
|
|
|
|
|
|
|
- Display a customized summary using a comma-separated list of columns:
|
|
|
|
|
2025-03-12 21:05:58 +02:00
|
|
|
`lsblk {{[-o|--output]}} {{NAME,SERIAL,MODEL,TRAN,TYPE,SIZE,FSTYPE,MOUNTPOINT,...}}`
|