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:

this mkfs frontend is deprecated in favour of the filesystem-specific mkfs.<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, --type type โ€” specify the type of filesystem to be built. if not specified, the default filesystem type (currently ext2) 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 -V will 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 size parameter 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