Filesystem
mkfs
Creates a filesystem on a partition or block device.
Ubuntu
CentOS
Debian
Arch
SUSE
Slackware
Alpine
Fedora
Verified: 2026-05-12
Syntax
$mkfs -t TYPE DEVICE [OPTIONS]
Examples
$mkfs -t ext4 /dev/sdb1
$mkfs.xfs /dev/sdc1
$mkfs.vfat -F 32 /dev/sdb1
Typical use cases
?
Standard usage
mkfs --help
Note
Initializes a new filesystem and replaces existing metadata structures.
Export