{
    "content": [
        {
            "type": "text",
            "text": "# MKFS (man)\n\n## NAME\n\nmkfs - build a Linux filesystem\n\n## SYNOPSIS\n\nmkfs [options] [-t type] [fs-options] device [size]\n\n## TLDR\n\n> Build a Linux filesystem on a hard disk partition.\n\n- Build a Linux ext2 filesystem on a partition:\n  `sudo mkfs {{/dev/sdXY}}`\n- Build a filesystem of a specified type:\n  `sudo mkfs {{-t|--type}} {{ext4}} {{/dev/sdXY}}`\n- Build a filesystem of a specified type and check for bad blocks:\n  `sudo mkfs -c {{-t|--type}} {{ntfs}} {{/dev/sdXY}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (1 subsections)\n- **OPTIONS** (4 subsections)\n- **BUGS**\n- **AUTHORS**\n- **SEE ALSO**\n- **REPORTING BUGS**\n- **AVAILABILITY**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "MKFS",
        "section": "",
        "mode": "man",
        "summary": "mkfs - build a Linux filesystem",
        "synopsis": "mkfs [options] [-t type] [fs-options] device [size]",
        "tldr_summary": "Build a Linux filesystem on a hard disk partition.",
        "tldr_examples": [
            {
                "description": "Build a Linux ext2 filesystem on a partition",
                "command": "sudo mkfs {{/dev/sdXY}}"
            },
            {
                "description": "Build a filesystem of a specified type",
                "command": "sudo mkfs {{-t|--type}} {{ext4}} {{/dev/sdXY}}"
            },
            {
                "description": "Build a filesystem of a specified type and check for bad blocks",
                "command": "sudo mkfs -c {{-t|--type}} {{ntfs}} {{/dev/sdXY}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-t",
                "long": "--type",
                "arg": null,
                "description": "Specify the type of filesystem to be built. If not specified, the default filesystem type (currently ext2) is used. fs-options Filesystem-specific options to be passed to the real filesystem builder."
            },
            {
                "flag": "-V",
                "long": "--verbose",
                "arg": null,
                "description": "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."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Display version information and exit. (Option -V will display version information only when it is the only parameter, otherwise it will work as --verbose.)"
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Display help text and exit."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "fs",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/fs/5/json"
            },
            {
                "name": "badblocks",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/badblocks/8/json"
            },
            {
                "name": "fsck",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/fsck/8/json"
            },
            {
                "name": "mkdosfs",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mkdosfs/8/json"
            },
            {
                "name": "mke2fs",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mke2fs/8/json"
            },
            {
                "name": "mkfs.bfs",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mkfs.bfs/8/json"
            },
            {
                "name": "mkfs.ext2",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mkfs.ext2/8/json"
            },
            {
                "name": "mkfs.ext3",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mkfs.ext3/8/json"
            },
            {
                "name": "mkfs.ext4",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mkfs.ext4/8/json"
            },
            {
                "name": "mkfs.minix",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mkfs.minix/8/json"
            },
            {
                "name": "mkfs.msdos",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mkfs.msdos/8/json"
            },
            {
                "name": "mkfs.vfat",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mkfs.vfat/8/json"
            },
            {
                "name": "mkfs.xfs",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mkfs.xfs/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 1,
                "subsections": [
                    {
                        "name": "This mkfs frontend is deprecated in favour of filesystem specific mkfs.<type> utils.",
                        "lines": 12
                    }
                ]
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-t --type",
                        "lines": 6,
                        "flag": "-t",
                        "long": "--type"
                    },
                    {
                        "name": "-V --verbose",
                        "lines": 4,
                        "flag": "-V",
                        "long": "--verbose"
                    },
                    {
                        "name": "-V --version",
                        "lines": 3,
                        "flag": "-V",
                        "long": "--version"
                    },
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    }
                ]
            },
            {
                "name": "BUGS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AVAILABILITY",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "mkfs - build a Linux filesystem\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "mkfs [options] [-t type] [fs-options] device [size]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "",
                "subsections": [
                    {
                        "name": "This mkfs frontend is deprecated in favour of filesystem specific mkfs.<type> utils.",
                        "content": "mkfs is used to build a Linux filesystem on a device, usually a hard disk partition. The\ndevice argument is either the device name (e.g., /dev/hda1, /dev/sdb2), or a regular file\nthat shall contain the filesystem. The size argument is the number of blocks to be used for\nthe filesystem.\n\nThe exit status returned by mkfs is 0 on success and 1 on failure.\n\nIn actuality, mkfs is simply a front-end for the various filesystem builders (mkfs.fstype)\navailable under Linux. The filesystem-specific builder is searched for via your PATH\nenvironment setting only. Please see the filesystem-specific builder manual pages for further\ndetails.\n"
                    }
                ]
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-t --type",
                        "content": "Specify the type of filesystem to be built. If not specified, the default filesystem type\n(currently ext2) is used.\n\nfs-options\nFilesystem-specific options to be passed to the real filesystem builder.\n",
                        "flag": "-t",
                        "long": "--type"
                    },
                    {
                        "name": "-V --verbose",
                        "content": "Produce verbose output, including all filesystem-specific commands that are executed.\nSpecifying this option more than once inhibits execution of any filesystem-specific\ncommands. This is really only useful for testing.\n",
                        "flag": "-V",
                        "long": "--verbose"
                    },
                    {
                        "name": "-V --version",
                        "content": "Display version information and exit. (Option -V will display version information only\nwhen it is the only parameter, otherwise it will work as --verbose.)\n",
                        "flag": "-V",
                        "long": "--version"
                    },
                    {
                        "name": "-h --help",
                        "content": "Display help text and exit.\n",
                        "flag": "-h",
                        "long": "--help"
                    }
                ]
            },
            "BUGS": {
                "content": "All generic options must precede and not be combined with filesystem-specific options. Some\nfilesystem-specific programs do not automatically detect the device size and require the size\nparameter to be specified.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "David Engel <david@ods.com>, Fred N. van Kempen <waltje@uwalt.nl.mugnet.org>, Ron Sommeling\n<sommel@sci.kun.nl>.\n\nThe manual page was shamelessly adapted from Remy Card’s version for the ext2 filesystem.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "fs(5), badblocks(8), fsck(8), mkdosfs(8), mke2fs(8), mkfs.bfs(8), mkfs.ext2(8), mkfs.ext3(8),\nmkfs.ext4(8), mkfs.minix(8), mkfs.msdos(8), mkfs.vfat(8), mkfs.xfs(8)\n",
                "subsections": []
            },
            "REPORTING BUGS": {
                "content": "For bug reports, use the issue tracker at https://github.com/karelzak/util-linux/issues.\n",
                "subsections": []
            },
            "AVAILABILITY": {
                "content": "The mkfs command is part of the util-linux package which can be downloaded from Linux Kernel\nArchive <https://www.kernel.org/pub/linux/utils/util-linux/>.\n\n\n\nutil-linux 2.37.2                            2021-06-02                                      MKFS(8)",
                "subsections": []
            }
        }
    }
}