Linux Disk Storage Cheat Sheet/Create an XFS filesystem

Format a partition as XFS.

Section: Format, Label, and Tune

Create an XFS filesystem

bash
bash
sudo mkfs.xfs /dev/sdb1
Explanation

Format a partition as XFS.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Format, Label, and Tune
Create an ext4 filesystem
Format a partition as ext4.
OpenIn sheetbashsame section
Create a FAT32 filesystem
Useful for EFI partitions or removable media.
OpenIn sheetbashsame section
Create swap area
Initialize a partition or file as swap.
OpenIn sheetbashsame section
Set an XFS label
Assign a label to an XFS filesystem.
OpenIn sheetbashsame section
Show XFS filesystem geometry
Display XFS geometry and feature flags.
OpenIn sheetbashsame section
Set an ext filesystem label
Assign a human-readable label to an ext filesystem.
OpenIn sheetbashsame section