Linux · Flashcard

Which command creates an ext4 filesystem on a partition?

  • A`mkfs.ext4 /dev/sda1` — formats the partition with an ext4 filesystem
  • B`fsck.ext4 /dev/sda1` — formats the partition with an ext4 filesystem
  • C`mount.ext4 /dev/sda1` — formats the partition with an ext4 filesystem
  • D`tune2fs /dev/sda1` — formats the partition with an ext4 filesystem

Why this is the answer

mkfs.ext4 (or mkfs -t ext4) builds a fresh ext4 filesystem, destroying existing data. fsck checks a filesystem, mount attaches one, and tune2fs adjusts parameters of an existing ext filesystem.

Official docs
Study in Gnoseed →