{
    "content": [
        {
            "type": "text",
            "text": "# SWITCH_ROOT(8) (man)\n\n**Summary:** switchroot - switch to another filesystem as the root of the mount tree\n\n**Synopsis:** switchroot [-hV]\nswitchroot newroot init [arg...]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -h | --help | — | Display help text and exit. |\n| -V | --version | — | Display version information and exit. |\n\n## See Also\n\n- chroot(2)\n- init(8)\n- mkinitrd(8)\n- mount(8)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (4 lines)\n- **DESCRIPTION** (4 lines) — 1 subsections\n  - filesystem. (1 lines)\n- **OPTIONS** (1 lines) — 2 subsections\n  - -h, --help (2 lines)\n  - -V, --version (2 lines)\n- **EXIT STATUS** (2 lines)\n- **NOTES** (6 lines)\n- **AUTHORS** (2 lines)\n- **SEE ALSO** (2 lines)\n- **REPORTING BUGS** (2 lines)\n- **AVAILABILITY** (6 lines)\n\n## Full Content\n\n### NAME\n\nswitchroot - switch to another filesystem as the root of the mount tree\n\n### SYNOPSIS\n\nswitchroot [-hV]\n\nswitchroot newroot init [arg...]\n\n### DESCRIPTION\n\nswitchroot moves already mounted /proc, /dev, /sys and /run to newroot and makes newroot the\nnew root filesystem and starts init process.\n\nWARNING: switchroot removes recursively all files and directories on the current root\n\n#### filesystem.\n\n### OPTIONS\n\n#### -h, --help\n\nDisplay help text and exit.\n\n#### -V, --version\n\nDisplay version information and exit.\n\n### EXIT STATUS\n\nswitchroot returns 0 on success and 1 on failure.\n\n### NOTES\n\nswitchroot will fail to function if newroot is not the root of a mount. If you want to\nswitch root into a directory that does not meet this requirement then you can first use a\nbind-mounting trick to turn any directory into a mount point:\n\nmount --bind $DIR $DIR\n\n### AUTHORS\n\nPeter Jones <pjones@redhat.com>, Jeremy Katz <katzj@redhat.com>, Karel Zak <kzak@redhat.com>\n\n### SEE ALSO\n\nchroot(2), init(8), mkinitrd(8), mount(8)\n\n### REPORTING BUGS\n\nFor bug reports, use the issue tracker at https://github.com/karelzak/util-linux/issues.\n\n### AVAILABILITY\n\nThe switchroot command is part of the util-linux package which can be downloaded from Linux\nKernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.\n\n\n\nutil-linux 2.37.2                            2021-06-02                               SWITCHROOT(8)\n\n"
        }
    ],
    "structuredContent": {
        "command": "SWITCH_ROOT",
        "section": "8",
        "mode": "man",
        "summary": "switchroot - switch to another filesystem as the root of the mount tree",
        "synopsis": "switchroot [-hV]\nswitchroot newroot init [arg...]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Display help text and exit."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Display version information and exit."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "chroot",
                "section": "2",
                "url": "https://www.chedong.com/phpMan.php/man/chroot/2/json"
            },
            {
                "name": "init",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/init/8/json"
            },
            {
                "name": "mkinitrd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mkinitrd/8/json"
            },
            {
                "name": "mount",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mount/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": [
                    {
                        "name": "filesystem.",
                        "lines": 1
                    }
                ]
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-h, --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-V, --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "EXIT STATUS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AVAILABILITY",
                "lines": 6,
                "subsections": []
            }
        ]
    }
}