commands.sh

mkfs

linux

Build a Linux filesystem on a hard disk partition. This command is deprecated in favor of filesystem specific mkfs.type utils.

More info →

Options (1)

-t, --typeboolean

Build a filesystem of a specified type

Example: sudo mkfs {{[-t|--type]}} {{ext4}} {{/dev/sdXY}}

Examples (3)

Build a Linux ext2 filesystem on a partition

sudo mkfs /dev/sdXY

Build a filesystem of a specified type

sudo mkfs [-t|--type] ext4 /dev/sdXY

Build a filesystem of a specified type and check for bad blocks

sudo mkfs -c [-t|--type] ntfs /dev/sdXY
made by @shridhargupta | data from tldr-pages