{
    "content": [
        {
            "type": "text",
            "text": "# swaplabel (man)\n\n## NAME\n\nswaplabel - print or change the label or UUID of a swap area\n\n## SYNOPSIS\n\nswaplabel [-L label] [-U UUID] device\n\n## DESCRIPTION\n\nswaplabel will display or change the label or UUID of a swap partition located on device (or\nregular file).\n\n## TLDR\n\n> Print or change the label or UUID of a swap area.\n\n- Display the current label and UUID of a swap area:\n  `swaplabel {{path/to/file}}`\n- Set the label of a swap area:\n  `swaplabel {{-L|--label}} {{new_label}} {{path/to/file}}`\n- Set the UUID of a swap area (you can generate a UUID using `uuidgen`):\n  `swaplabel {{-U|--uuid}} {{new_uuid}} {{path/to/file}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (3 subsections)\n- **ENVIRONMENT**\n- **AUTHORS**\n- **SEE ALSO**\n- **REPORTING BUGS**\n- **AVAILABILITY**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "swaplabel",
        "section": "",
        "mode": "man",
        "summary": "swaplabel - print or change the label or UUID of a swap area",
        "synopsis": "swaplabel [-L label] [-U UUID] device",
        "tldr_summary": "Print or change the label or UUID of a swap area.",
        "tldr_examples": [
            {
                "description": "Display the current label and UUID of a swap area",
                "command": "swaplabel {{path/to/file}}"
            },
            {
                "description": "Set the label of a swap area",
                "command": "swaplabel {{-L|--label}} {{new_label}} {{path/to/file}}"
            },
            {
                "description": "Set the UUID of a swap area (you can generate a UUID using `uuidgen`)",
                "command": "swaplabel {{-U|--uuid}} {{new_uuid}} {{path/to/file}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Display help text and exit."
            },
            {
                "flag": "-L",
                "long": "--label",
                "arg": null,
                "description": "Specify a new label for the device. Swap partition labels can be at most 16 characters long. If label is longer than 16 characters, swaplabel will truncate it and print a warning message."
            },
            {
                "flag": "-U",
                "long": "--uuid",
                "arg": null,
                "description": "Specify a new UUID for the device. The UUID must be in the standard 8-4-4-4-12 character format, such as is output by uuidgen(1)."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "uuidgen",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/uuidgen/1/json"
            },
            {
                "name": "mkswap",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mkswap/8/json"
            },
            {
                "name": "swapon",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/swapon/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-L --label",
                        "lines": 4,
                        "flag": "-L",
                        "long": "--label"
                    },
                    {
                        "name": "-U --uuid",
                        "lines": 3,
                        "flag": "-U",
                        "long": "--uuid"
                    }
                ]
            },
            {
                "name": "ENVIRONMENT",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AVAILABILITY",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "swaplabel - print or change the label or UUID of a swap area\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "swaplabel [-L label] [-U UUID] device\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "swaplabel will display or change the label or UUID of a swap partition located on device (or\nregular file).\n\nIf the optional arguments -L and -U are not given, swaplabel will simply display the current\nswap-area label and UUID of device.\n\nIf an optional argument is present, then swaplabel will change the appropriate value on\ndevice. These values can also be set during swap creation using mkswap(8). The swaplabel\nutility allows changing the label or UUID on an actively used swap device.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-h --help",
                        "content": "Display help text and exit.\n",
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-L --label",
                        "content": "Specify a new label for the device. Swap partition labels can be at most 16 characters\nlong. If label is longer than 16 characters, swaplabel will truncate it and print a\nwarning message.\n",
                        "flag": "-L",
                        "long": "--label"
                    },
                    {
                        "name": "-U --uuid",
                        "content": "Specify a new UUID for the device. The UUID must be in the standard 8-4-4-4-12 character\nformat, such as is output by uuidgen(1).\n",
                        "flag": "-U",
                        "long": "--uuid"
                    }
                ]
            },
            "ENVIRONMENT": {
                "content": "LIBBLKIDDEBUG=all\nenables libblkid debug output.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "swaplabel was written by Jason Borden <jborden@bluehost.com> and Karel Zak <kzak@redhat.com>.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "uuidgen(1), mkswap(8), swapon(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 swaplabel 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                                 SWAPLABEL(8)",
                "subsections": []
            }
        }
    }
}