Forrest logo
back to the mkfs.ext2 tool

mke2fs:tldr:5ad37

mke2fs: Create an ext2 filesystem in partition 1 of device b (`sdb1`).
$ mkfs.ext2 ${-dev-sdb1}
try on your machine

The command "mkfs.ext2 ${-dev-sdb1}" is used to create an ext2 file system on a specified device or partition.

Here's a breakdown of each component of the command:

  • "mkfs.ext2" invokes the "mkfs" utility with the "ext2" filesystem type. This utility is used to create a file system on a disk or partition.

  • "${-dev-sdb1}" represents the device or partition on which the file system will be created. This is typically specified as a device file under the "/dev" directory. In this command, it is referring to a specific device file named "/dev/sdb1". Note that "$" and "{}" are not necessary here and may have been included by mistake.

To summarize, running this command will format the device or partition "/dev/sdb1" with the ext2 file system, effectively erasing any existing data on it and preparing it for use with the ext2 file system.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the mkfs.ext2 tool