Easy Tutorial
❮ Linux Comm Statserial Linux Shell Include File ❯

Linux mkfs Command

Linux Command Manual

The Linux mkfs (short for "make file system") command is used to create a Linux file system on a specified partition.

Usage:

mkfs [-V] [-t fstype] [fs-options] filesys [blocks]

Parameters:

Example

Create an msdos file system on /dev/hda5, check for bad blocks, and display detailed process:

mkfs -V -t msdos -c /dev/hda5

Format the sda6 partition as ext3:

mkfs -t ext3 /dev/sda6

Note: The file system type must be specified, such as ext3, reiserfs, ext2, fat32, msdos, etc.

Linux Command Manual

❮ Linux Comm Statserial Linux Shell Include File ❯