{
    "mode": "man",
    "parameter": "environment",
    "section": "5",
    "url": "https://www.chedong.com/phpMan.php/man/environment/5/json",
    "generated": "2026-10-05T07:14:07Z",
    "sections": {
        "NAME": {
            "content": "pamenv.conf, environment - the environment variables config files\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The /etc/security/pamenv.conf file specifies the environment variables to be set, unset or\nmodified by pamenv(8). When someone logs in, this file is read and the environment variables\nare set according.\n\nEach line starts with the variable name, there are then two possible options for each\nvariable DEFAULT and OVERRIDE. DEFAULT allows an administrator to set the value of the\nvariable to some default value, if none is supplied then the empty string is assumed. The\nOVERRIDE option tells pamenv that it should enter in its value (overriding the default\nvalue) if there is one to use. When OVERRIDE is not used, \"\" is assumed and no override will\nbe done.\n\nVARIABLE [DEFAULT=[value]] [OVERRIDE=[value]]\n\n(Possibly non-existent) environment variables may be used in values using the ${string}\nsyntax and (possibly non-existent) PAMITEMs as well as HOME and SHELL may be used in values\nusing the @{string} syntax. Both the $ and @ characters can be backslash escaped to be used\nas literal values values can be delimited with \"\", escaped \" not supported. Note that many\nenvironment variables that you would like to use may not be set by the time the module is\ncalled. For example, ${HOME} is used below several times, but many PAM applications don't\nmake it available by the time you need it. The special variables @{HOME} and @{SHELL} are\nexpanded to the values for the user from his passwd entry.\n\nThe \"#\" character at start of line (no space at front) can be used to mark this line as a\ncomment line.\n\nThe /etc/environment file specifies the environment variables to be set. The file must\nconsist of simple NAME=VALUE pairs on separate lines. The pamenv(8) module will read the\nfile after the pamenv.conf file.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "These are some example lines which might be specified in /etc/security/pamenv.conf.\n\nSet the REMOTEHOST variable for any hosts that are remote, default to \"localhost\" rather than\nnot being set at all\n\nREMOTEHOST     DEFAULT=localhost OVERRIDE=@{PAMRHOST}\n\n\nSet the DISPLAY variable if it seems reasonable\n\nDISPLAY        DEFAULT=${REMOTEHOST}:0.0 OVERRIDE=${DISPLAY}\n\n\nNow some simple variables\n\nPAGER          DEFAULT=less\nMANPAGER       DEFAULT=less\nLESS           DEFAULT=\"M q e h15 z23 b80\"\nNNTPSERVER     DEFAULT=localhost\nPATH           DEFAULT=${HOME}/bin:/usr/local/bin:/bin\\\n:/usr/bin:/usr/local/bin/X11:/usr/bin/X11\nXDGDATAHOME  DEFAULT=@{HOME}/share/\n\n\nSilly examples of escaped variables, just to show how they work.\n\nDOLLAR         DEFAULT=\\$\nDOLLARDOLLAR   DEFAULT=        OVERRIDE=\\$${DOLLAR}\nDOLLARPLUS     DEFAULT=\\${REMOTEHOST}${REMOTEHOST}\nATSIGN         DEFAULT=\"\"      OVERRIDE=\\@\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "pamenv(8), pam.d(5), pam(7), environ(7)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "pamenv was written by Dave Kinchlea <kinch@kinch.ark.com>.\n\nLinux-PAM                                    05/07/2023                              PAMENV.CONF(5)",
            "subsections": []
        }
    },
    "summary": "pamenv.conf, environment - the environment variables config files",
    "flags": [],
    "examples": [
        "These are some example lines which might be specified in /etc/security/pamenv.conf.",
        "Set the REMOTEHOST variable for any hosts that are remote, default to \"localhost\" rather than",
        "not being set at all",
        "REMOTEHOST     DEFAULT=localhost OVERRIDE=@{PAMRHOST}",
        "Set the DISPLAY variable if it seems reasonable",
        "DISPLAY        DEFAULT=${REMOTEHOST}:0.0 OVERRIDE=${DISPLAY}",
        "Now some simple variables",
        "PAGER          DEFAULT=less",
        "MANPAGER       DEFAULT=less",
        "LESS           DEFAULT=\"M q e h15 z23 b80\"",
        "NNTPSERVER     DEFAULT=localhost",
        "PATH           DEFAULT=${HOME}/bin:/usr/local/bin:/bin\\",
        ":/usr/bin:/usr/local/bin/X11:/usr/bin/X11",
        "XDGDATAHOME  DEFAULT=@{HOME}/share/",
        "Silly examples of escaped variables, just to show how they work.",
        "DOLLAR         DEFAULT=\\$",
        "DOLLARDOLLAR   DEFAULT=        OVERRIDE=\\$${DOLLAR}",
        "DOLLARPLUS     DEFAULT=\\${REMOTEHOST}${REMOTEHOST}",
        "ATSIGN         DEFAULT=\"\"      OVERRIDE=\\@"
    ],
    "see_also": [
        {
            "name": "pamenv",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/pamenv/8/json"
        },
        {
            "name": "pam.d",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/pam.d/5/json"
        },
        {
            "name": "pam",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/pam/7/json"
        },
        {
            "name": "environ",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/environ/7/json"
        }
    ]
}