{
    "mode": "man",
    "parameter": "printenv",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/printenv/1/json",
    "generated": "2026-06-02T23:35:54Z",
    "synopsis": "printenv [OPTION]... [VARIABLE]...",
    "sections": {
        "NAME": {
            "content": "printenv - print all or part of environment\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "printenv [OPTION]... [VARIABLE]...\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Print  the  values  of  the  specified environment VARIABLE(s).  If no VARIABLE is specified,\nprint name and value pairs for them all.\n",
            "subsections": [
                {
                    "name": "-0 --null",
                    "content": "end each output line with NUL, not newline\n\n--help display this help and exit\n",
                    "flag": "-0",
                    "long": "--null"
                },
                {
                    "name": "--version",
                    "content": "output version information and exit\n\nNOTE: your shell may have its own version of printenv, which usually supersedes  the  version\ndescribed  here.  Please refer to your shell's documentation for details about the options it\nsupports.\n",
                    "long": "--version"
                }
            ]
        },
        "AUTHOR": {
            "content": "Written by David MacKenzie and Richard Mlynarik.\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "GNU coreutils online help: <https://www.gnu.org/software/coreutils/>\nReport any translation bugs to <https://translationproject.org/team/>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright © 2020 Free Software Foundation, Inc.  License GPLv3+: GNU GPL version 3  or  later\n<https://gnu.org/licenses/gpl.html>.\nThis  is free software: you are free to change and redistribute it.  There is NO WARRANTY, to\nthe extent permitted by law.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Full documentation <https://www.gnu.org/software/coreutils/printenv>\nor available locally via: info '(coreutils) printenv invocation'\n\n\n\nGNU coreutils 8.32                          January 2026                                 PRINTENV(1)",
            "subsections": []
        }
    },
    "summary": "printenv - print all or part of environment",
    "flags": [
        {
            "flag": "-0",
            "long": "--null",
            "arg": null,
            "description": "end each output line with NUL, not newline --help display this help and exit"
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "output version information and exit NOTE: your shell may have its own version of printenv, which usually supersedes the version described here. Please refer to your shell's documentation for details about the options it supports."
        }
    ],
    "examples": [],
    "see_also": [],
    "tldr": {
        "source": "official",
        "description": "Print values of environment variables.",
        "examples": [
            {
                "description": "Display key-value pairs of all environment variables",
                "command": "printenv"
            },
            {
                "description": "Display the value of a specific variable",
                "command": "printenv {{HOME}}"
            },
            {
                "description": "Display the value of a variable and end with NUL instead of newline",
                "command": "printenv {{-0|--null}} {{HOME}}"
            }
        ]
    }
}