FreeKB - Linux Commands mke2fs (create a file system)
Linux Commands - mke2fs (create a file system)

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 6a0d6 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |