{
    "mode": "info",
    "parameter": "hostname",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/hostname/json",
    "generated": "2026-07-25T13:53:36Z",
    "sections": {
        "File: coreutils.info,  Node: hostname invocation,  Next: hostid invocation,  Prev: uname invocation,  Up: System context": {
            "content": "",
            "subsections": [
                {
                    "name": "21.5 'hostname': Print or set system name",
                    "content": ""
                }
            ]
        },
        "With no arguments, 'hostname' prints the name of the current host": {
            "content": "system.  With one argument, it sets the current host name to the\nspecified string.  You must have appropriate privileges to set the host\nname.  Synopsis:\n\nhostname [NAME]\n\nThe only options are '--help' and '--version'.  *Note Common\noptions::.\n\n'hostname' is not installed by default, and other packages also\nsupply a 'hostname' command, so portable scripts should not rely on its\nexistence or on the exact behavior documented above.\n\nAn exit status of zero indicates success, and a nonzero value\nindicates failure.\n",
            "subsections": []
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}