{
    "mode": "info",
    "parameter": "logname",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/logname/json",
    "generated": "2026-11-15T17:00:09Z",
    "sections": {
        "File: coreutils.info,  Node: logname invocation,  Next: whoami invocation,  Prev: id invocation,  Up: User information": {
            "content": "",
            "subsections": [
                {
                    "name": "20.2 'logname': Print current login name",
                    "content": "'logname' prints the calling user's name, as found in a\nsystem-maintained file (often '/var/run/utmp' or '/etc/utmp'), and exits\nwith a status of 0.  If there is no entry for the calling process,\n'logname' prints an error message and exits with a status of 1.\n\nThe only options are '--help' and '--version'.  *Note Common\noptions::.\n\nAn exit status of zero indicates success, and a nonzero value\nindicates failure.\n"
                }
            ]
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}