MKFS(8)
๐ MKFS(8) โ the manual page, bestie edition ๐
okay so real talk: this is mkfs, and it lives in section 8 of the man pages (that's the system-administration girlies section, iykyk). she builds Linux filesystems. she's a little old-school, she's a frontend, and honestly? she's iconic. let's get into it. โจ
๐ธ NAME ๐ธ
mkfs โ build a Linux filesystem. that's it. that's the whole job. ๐ซถ
โจ SYNOPSIS โจ
mkfs [options] [-t type] [fs-options] device [size]
like. look at her. short, simple, devastating. ๐
๐ฆ DESCRIPTION ๐ฆ
okay so first things first, and I need you to hear me on this one:
thismkfsfrontend is deprecated in favour of the filesystem-specificmkfs.<type>utils. so like... she still works, but the cool kids are calling the specific ones now. no cap. ๐ญ
mkfs is used to build a Linux filesystem on a device, usually a hard disk partition. the device argument is either the device name (e.g., /dev/hda1, /dev/sdb2), or a regular file that shall contain the filesystem. the size argument is the number of blocks to be used for the filesystem.
the exit status returned by mkfs is 0 on success and 1 on failure. that's the whole vibe check: 0 = slay, 1 = ๐.
in actuality, mkfs is simply a front-end for the various filesystem builders (mkfs.fstype) available under Linux. the filesystem-specific builder is searched for via your PATH environment setting only. please see the filesystem-specific builder manual pages for further details.
๐ OPTIONS ๐
-t,--typetype โ specify the type of filesystem to be built. if not specified, the default filesystem type (currentlyext2) is used. yes,ext2. she's vintage. she's retro. we love her anyway. ๐fs-optionsโ filesystem-specific options to be passed to the real filesystem builder. not hers, theirs. she's just the messenger bestie.-V,--verboseโ produce verbose output, including all filesystem-specific commands that are executed. specifying this option more than once inhibits execution of any filesystem-specific commands. this is really only useful for testing. (also lowkey the wildest flag in here, keep reading ๐)-h,--helpโ display help text and exit. the classic. the icon. ๐ซถ-V,--versionโ display version and exit. (Option-Vwill display version information only when it is the only parameter, otherwise it will work as--verbose.)
not the SAME -V doing two completely different jobs depending on how lonely it is ๐ญ bestie is a method actor fr fr
๐ BUGS ๐
- all generic options must precede and not be combined with filesystem-specific options. order matters, queen. do not freestyle this.
- some filesystem-specific programs do not automatically detect the device size and require the
sizeparameter to be specified.
so if you skip size and your builder doesn't auto-detect, it's giving "surprise, nothing works" energy. just pass the size. trust. ๐
๐ AUTHORS ๐
David Engel <david@ods.com>, Fred N. van Kempen <waltje@uwalt.nl.mugnet.org>, Ron Sommeling <sommel@sci.kun.nl>.
the manual page was shamelessly adapted from Remy Card's version for the ext2 filesystem. "shamelessly" is their word, not mine, and honestly? respect the honesty. ๐
๐ฅ SEE ALSO ๐ฅ
fs(5), badblocks(8), fsck(8), mkdosfs(8), mke2fs(8), mkfs.bfs(8), mkfs.ext2(8), mkfs.ext3(8), mkfs.ext4(8), mkfs.minix(8), mkfs.msdos(8), mkfs.vfat(8), mkfs.xfs(8)
that's the whole friend group right there. the mkfs.<type> girlies. go say hi. ๐
๐ REPORTING BUGS ๐
for bug reports, use the issue tracker <https://github.com/util-linux/util-linux/issues>.
found a problem? don't suffer in silence, bestie. tell the maintainers. they're nice, I promise. ๐
โญ AVAILABILITY โญ
the mkfs command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.
and that's the whole page, bestie!! this one came from util-linux 2.42.4, dated 2026-09-21, and it's MKFS(8) in the system administration section ๐ง go build something cute (but maybe read the fs-specific man page first, fr fr) ๐โจ๐
๐ฆ where this page comes from
- arch rolling: util-linux 2.42.4-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND LGPL-2.1-or-later AND LicenseRef-PublicDomain
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms