Creating File Systems In Linux With mkfs – POFTUT

Creating File Systems In Linux With mkfs


File systems are the main component of operating systems. File systems provide the required infrastructure for holding data permanently operating system level. Linux supports diverse types of file systems. We will look at how to create major file systems on partitions. The standard tool for Linux to create an operating system is mkfs.

Create Ext4 File System

The ext4 file system is the most popular file system of the Linux world. This file system is used most of the Linux distributions. Ext4 is also the latest version of the Ext file system. The general performance of Ext4 is very good. Also, this file system supports a lot of features for enterprise requirements. Now let’s create an Ext4 file system with the following command. Creating a file system requires root privileges so we use sudo command. In this example, we will create a file system on /dev/vdb1

$ sudo mkfs.ext4 /dev/vdb1
Create Ext4 File System
Create Ext4 File System

Create Ext3 File System

Ext3 is the previous version of the Ext4 and some older all ready installed systems use 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 Ext3 File System
Create Ext3 File System

Create Btrfs File System

Butterfs or simply btrfs is a new generation file system designed from scratch. It has unique features other Linux file systems like ext4 do not have. The following command will create btrfs file system. We use also -f to create a file system forcibly because if it is all ready a file system in the partition btrfs partition will not be created.

$ sudo mkfs.btrfs -f /dev/vdb1
Create Btrfs File System
Create Btrfs File System

Create Xfs File System

Xfs is a standard file system used by RedHat 7 and CentOS 7. Xfs is the alternative of next-generation filesystems like Btrfs. Xfs is an enterprise-level file system supported by RedHat.

$ sudo mkfs.xfs -f /dev/vdb1
Create Xfs File System
Create Xfs File System

Create NTFS File System

NTFS is a Windows default file system that is used by a lot of computers and servers. The NTFS file system provides similar features to the Btrfs. NTFS usage starts by default with Windows XP.

$ sudo mkfs.ntfs /dev/vdb1
Create NTFS File System
Create NTFS File System

Create FAT File System

FAT is the Windows world file system and used mostly before the NTFS file system. FAT is very famous with different devices like a camera, Tv, etc. Those generally support FAT.

$ sudo mkfs.fat  /dev/vdb1
Create FAT File System
Create FAT File System

LEARN MORE  Windows Diskpart Command Tutorial

Leave a Comment