{
    "mode": "info",
    "parameter": "tty",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/tty/json",
    "generated": "2026-07-29T01:24:25Z",
    "sections": {
        "File: coreutils.info,  Node: tty invocation,  Prev: printenv invocation,  Up: Working context": {
            "content": "",
            "subsections": [
                {
                    "name": "19.4 'tty': Print file name of terminal on standard input",
                    "content": "'tty' prints the file name of the terminal connected to its standard\ninput.  It prints 'not a tty' if standard input is not a terminal.\nSynopsis:\n\ntty [OPTION]...\n\nThe program accepts the following option.  Also see *note Common\noptions::.\n\n'-s'\n'--silent'\n'--quiet'\nPrint nothing; only return an exit status.\n\nExit status:\n\n0 if standard input is a terminal\n1 if standard input is a non-terminal file\n2 if given incorrect arguments\n3 if a write error occurs\n"
                }
            ]
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}