{
    "mode": "man",
    "parameter": "grub-editenv",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/grub-editenv/1/json",
    "generated": "2026-06-15T14:40:14Z",
    "synopsis": "grub-editenv [OPTION...] FILENAME COMMAND",
    "sections": {
        "NAME": {
            "content": "grub-editenv - edit GRUB environment block\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "grub-editenv [OPTION...] FILENAME COMMAND\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Tool to edit environment block.\n\nCommands:\n\ncreate Create a blank environment block file.\n\nlist   List the current variables.\n\nset [NAME=VALUE ...]\nSet variables.\n\nunset [NAME ...]\nDelete variables.\n\nOptions:\n\n-?, --help\ngive this help list\n",
            "subsections": [
                {
                    "name": "--usage",
                    "content": "give a short usage message\n",
                    "long": "--usage"
                },
                {
                    "name": "-v --verbose",
                    "content": "print verbose messages.\n",
                    "flag": "-v",
                    "long": "--verbose"
                },
                {
                    "name": "-V --version",
                    "content": "print program version\n\nIf FILENAME is `-', the default value /boot/grub/grubenv is used.\n\nThere  is  no  `delete'  command;  if you want to delete the whole environment block, use `rm\n/boot/grub/grubenv'.\n",
                    "flag": "-V",
                    "long": "--version"
                }
            ]
        },
        "REPORTING BUGS": {
            "content": "Report bugs to <bug-grub@gnu.org>.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "grub-reboot(8), grub-set-default(8)\n\nThe full documentation for grub-editenv is maintained as a Texinfo manual.  If the  info  and\ngrub-editenv programs are properly installed at your site, the command\n\ninfo grub-editenv\n\nshould give you access to the complete manual.\n\n\n\nGRUB 2.06-2ubuntu7.2                        December 2022                            GRUB-EDITENV(1)",
            "subsections": []
        }
    },
    "summary": "grub-editenv - edit GRUB environment block",
    "flags": [
        {
            "flag": "",
            "long": "--usage",
            "arg": null,
            "description": "give a short usage message"
        },
        {
            "flag": "-v",
            "long": "--verbose",
            "arg": null,
            "description": "print verbose messages."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "print program version If FILENAME is `-', the default value /boot/grub/grubenv is used. There is no `delete' command; if you want to delete the whole environment block, use `rm /boot/grub/grubenv'."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "grub-reboot",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/grub-reboot/8/json"
        },
        {
            "name": "grub-set-default",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/grub-set-default/8/json"
        },
        {
            "name": "GRUB-EDITENV",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/GRUB-EDITENV/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Edit GRUB environment variables.",
        "examples": [
            {
                "description": "Set a default boot entry (Assuming the boot entry already exists)",
                "command": "grub-editenv /boot/grub/grubenv set default={{Ubuntu}}"
            },
            {
                "description": "Display all GRUB environment variables",
                "command": "grub-editenv /boot/grub/grubenv list"
            },
            {
                "description": "Reset the `saved_entry` variable to the default",
                "command": "grub-editenv /boot/grub/grubenv unset saved_entry"
            }
        ]
    }
}