Create a file system using the MKE2FS command in Linux

Home > Search > Linux commands
  by

The mke2fs 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 ~]# mke2fs.ext4 /dev/sda2
[root@server1 ~]# mke2fs -t ext4 /dev/sda2

 

It is somewhat common to use the -j option, which uses journaling and the ext3 file system.

[root@server1 ~]# mke2fs -j /dev/sda2

 

Following are some of the more popular filesystem types used by Linux.

  • ext2 (second extended file system)
  • ext3 (third extended file system)
  • ext4 (fourth extended file system)
  • xfs (extended file system)
  • lvm (logical volume)
  • raid

 

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments