Create a filesystem
high risk
blkid /dev/sdXCheck whether it already holds a filesystemlsblk -fVerify the target deviceBuilds a filesystem (mkfs.ext4, mkfs.xfs, mkfs.btrfs …) on a partition or LV.
| Flag | Meaning |
|---|---|
-t | Filesystem type |
-L | Volume label |
-F | Force (even if filesystem exists)⚠ Skips safety checks. |
mkfs.ext4 -L data /dev/sdb1Format a partition · explain & risk-check →mkfs.xfs /dev/vg0/dataFormat an LV · explain & risk-check →Reference text is hand-written and may be incomplete — check man mkfs for your version. Test destructive commands on a non-production system first.