tldr/pages/linux/lsblk.md

37 lines
697 B
Markdown
Raw Normal View History

2016-01-05 15:11:55 +00:00
# lsblk
2016-01-13 11:04:46 +00:00
> Lists information about devices.
> More information: <https://manned.org/lsblk>.
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`
- Exclude the devices specified by the comma-separated list of major device numbers:
`lsblk -e {{1,7,...}}`
- Display a customized summary using a comma-separated list of columns:
`lsblk --output {{NAME,SERIAL,MODEL,TRAN,TYPE,SIZE,FSTYPE,MOUNTPOINT,...}}`