mkfs

Create a filesystem

high risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
Safer / dry-run alternatives
blkid /dev/sdXCheck whether it already holds a filesystem
lsblk -fVerify the target device
What it does

Builds a filesystem (mkfs.ext4, mkfs.xfs, mkfs.btrfs …) on a partition or LV.

Common flags
FlagMeaning
-tFilesystem type
-LVolume label
-FForce (even if filesystem exists)⚠ Skips safety checks.
Examples
mkfs.ext4 -L data /dev/sdb1Format a partition · explain & risk-check →
mkfs.xfs /dev/vg0/dataFormat an LV · explain & risk-check →
Related
lsblk blkid fdisk
Open the full explainer →More in Disks & Filesystems

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