File systems are main component of operating systems. File systems provide required infrastructure for holding data permanently operating system level. Linux supports diverse type of file systems. We will look how to create major file systems on partitions. Standard tool for Linux to create operating system is mkfs.
Create Ext4 File System
Ext4 file system is most popular file system of Linux world. This file system is used most of the Linux distributions. Ext4 is also the latest version of Ext file system. The general performance of Ext4 is very good. Also this file system supports a lot of features for enterprise requirements. Now lets create Ext4 file system with the following command. Creating file system requires root privileges so we use
sudo command. In this example we will create file system on
$ sudo mkfs.ext4 /dev/vdb1
Create Ext3 File System
Ext3 is the previous version of the Ext4 and some older all ready installed systems uses this file system. Also Ext3 is more compatible with different devices and applications. This file system used for boots partition.
$ sudo mkfs.ext3 /dev/vdb1
Create Btrfs File System
Butterfs or simply btrfs is new generation file system designed from scratch. It has unique feature other Linux file systems like ext4 do not have. Following command will create btrfs file system. We use also
-f to create file system forcibly because if there is all ready a file system in the partition btrfs partition will not created.
$ sudo mkfs.btrfs -f /dev/vdb1
Create Xfs File System
Xfs is standard file system used by RedHat 7 and CentOS 7 . Xfs is the alternative of next generation filesystems like Btrfs. Xfs is enterprise level file system supported by RedHat.
$ sudo mkfs.xfs -f /dev/vdb1
Create NTFS File System
NTFS is Windows default file system which is used by a lot of computers and servers. NTFS file system provides similar features to the Btrfs. NTFS usage starts by default with Windows XP.
$ sudo mkfs.ntfs /dev/vdb1
Create FAT File System
FAT is Windows worlds file system and used mostly before NTFS file system. FAT is very famous with different devices like camera, Tv etc. Those generally supports FAT.
$ sudo mkfs.fat /dev/vdb1