To format a partition, the various
mkfs commands can be used. It depends on whether the supporting utilities are installed. When creating an
mkfs.ext4 is used. Likewise, to create a
mkfs.vfat is used. Each filesystem partitioning tool has different options and parameters, so the manual page for these commands should be checked for details. Generally speaking, when using the default settings, supplying the device-specific partition node, such as
/dev/sdb1, for the first partition
(1) on the second hard or flash disk
(b) is passed as a parameter to the
mkfs commands. Creating filesystems is a destructive operation. Use it with care!
In the following example, an
ext4 filesystem is created ...