The mkfs command can be used to create a filesystem. In this example, either of these commands will configure the /dev/sda2 partition to use the ext4 file system.
[root@server1 ~]# mkfs.ext4 /dev/sda2 [root@server1 ~]# mkfs -t ext4 /dev/sda2
The mkfs is very simple, and only has a few options. the mke2fs command is more advanced, and includes many possible options.
Following are some of the more popular filesystem types used by Linux.