blockdev

Block device ioctls

high risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
What it does

Query or set block-device parameters. See the flags and examples below, and run `man blockdev` for the full reference.

Common flags
FlagMeaning
--getsize64 --getsize64Size in bytes
--setro --setroMake read-only
--setrw --setrwMake writable⚠ Can expose data to writes.
Examples
blockdev --getsize64 /dev/sdaDisk size · explain & risk-check →
Related
lsblk
Open the full explainer →More in Disks & Filesystems

Reference text is hand-written and may be incomplete — check man blockdev for your version. Test destructive commands on a non-production system first.