LFCS · Question #699
Which type of filesystem is created by mkfs when it is executed with the block device name only and without any additional parameters?
The correct answer is A. ext2. When mkfs is executed only with a block device name and no other parameters, it creates an ext2 filesystem by default.
Question
Options
- Aext2
- Bext3
- Cext4
- DXFS
- EVFAT
How the community answered
(41 responses)- A93% (38)
- B5% (2)
- C2% (1)
Why each option
When `mkfs` is executed only with a block device name and no other parameters, it creates an `ext2` filesystem by default.
Historically, and for backward compatibility, if the `mkfs` command is executed without explicitly specifying a filesystem type using the `-t` option, it defaults to acting as a frontend for `mkfs.ext2`, thereby creating an ext2 filesystem on the specified device.
`ext3` is a journaling filesystem and requires explicit specification with `mkfs -t ext3` to be created, as it's not the default type.
`ext4` is a newer journaling filesystem and also requires explicit specification with `mkfs -t ext4` because it's not the default behavior of a generic `mkfs` call.
`XFS` is a completely different journaling filesystem and must be explicitly specified with `mkfs -t xfs` to be created, as it's not the default.
`VFAT` is a variation of the FAT filesystem, primarily for compatibility with Windows, and is not the default filesystem type created by `mkfs` on Linux without explicit type specification.
Concept tested: `mkfs` default filesystem type
Source: https://man7.org/linux/man-pages/man8/mkfs.8.html
Topics
Community Discussion
No community discussion yet for this question.