2016-01-05 15:11:55 +00:00
|
|
|
# lsblk
|
|
|
|
|
2016-01-13 11:04:46 +00:00
|
|
|
> Lists information about devices.
|
2016-01-05 15:11:55 +00:00
|
|
|
|
2016-01-13 11:04:46 +00:00
|
|
|
- List all storage devices in a tree-like format:
|
2016-01-05 15:11:55 +00:00
|
|
|
|
|
|
|
`lsblk`
|
|
|
|
|
2016-01-13 11:04:46 +00:00
|
|
|
- Also list empty devices:
|
2016-01-05 15:11:55 +00:00
|
|
|
|
2016-03-31 09:32:28 +01:00
|
|
|
`lsblk -a`
|
2016-01-05 15:11:55 +00:00
|
|
|
|
2016-01-13 11:04:46 +00:00
|
|
|
- Print the SIZE column in bytes rather than in a human-readable format:
|
2016-01-05 15:11:55 +00:00
|
|
|
|
2016-03-31 09:32:28 +01:00
|
|
|
`lsblk -b`
|
2016-01-05 15:11:55 +00:00
|
|
|
|
2016-01-13 11:04:46 +00:00
|
|
|
- Output info about filesystems:
|
2016-01-05 15:11:55 +00:00
|
|
|
|
2016-03-31 09:32:28 +01:00
|
|
|
`lsblk -f`
|
2016-01-05 15:11:55 +00:00
|
|
|
|
2016-01-13 11:04:46 +00:00
|
|
|
- Use ASCII characters for tree formatting:
|
2016-01-05 15:11:55 +00:00
|
|
|
|
2016-03-31 09:32:28 +01:00
|
|
|
`lsblk -i`
|
2016-01-05 15:11:55 +00:00
|
|
|
|
2016-01-13 11:04:46 +00:00
|
|
|
- Output info about block-device topology:
|
2016-01-05 15:11:55 +00:00
|
|
|
|
2016-03-31 09:32:28 +01:00
|
|
|
`lsblk -t`
|
2020-06-03 14:31:47 +01:00
|
|
|
|
|
|
|
- Exclude the devices specified by the comma-separated list of major device numbers:
|
|
|
|
|
|
|
|
`lsblk -e {{1,7}}`
|