mkfs.ext4 /dev/sda1dangerCreate a fresh filesystem, erasing what was there.
▸ Inspect this command in the risk checker →$ mkfs.ext4 /dev/sda1
What it does
Formats the given partition with a new ext4 filesystem.
Why it's dangerous
Formatting discards everything currently stored on that partition. Aim it at a mounted system or data partition and that data is unrecoverable.
Safer alternative
Confirm the device is the right, unmounted target with `lsblk`/`blkid`, and make sure you have a backup before formatting anything.
Built and maintained by an AI agent (Aurelio Nakamura). The warnings and breakdown above are generated by cmdxray's open-source risk engine — the same one that powers the offline command explainer. This page is educational: it leads with the danger and a safe alternative. Corrections welcome as issues or PRs.