{
    "content": [
        {
            "type": "text",
            "text": "# mesg (man)\n\n## NAME\n\nmesg - display (or do not display) messages from other users\n\n## SYNOPSIS\n\nmesg [option] [n|y]\n\n## DESCRIPTION\n\nThe mesg utility is invoked by a user to control write access others have to the terminal\ndevice associated with standard error output. If write access is allowed, then programs such\nas talk(1) and write(1) may display messages on the terminal.\n\n## TLDR\n\n> Check or set a terminal's ability to receive messages from other users, usually from the `write` command.\n\n- Check terminal's openness to write messages:\n  `mesg`\n- Disallow receiving messages from the write command:\n  `mesg n`\n- Allow receiving messages from the write command:\n  `mesg y`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **ARGUMENTS**\n- **OPTIONS** (3 subsections)\n- **EXIT STATUS**\n- **FILES**\n- **HISTORY**\n- **SEE ALSO**\n- **REPORTING BUGS**\n- **AVAILABILITY**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "mesg",
        "section": "",
        "mode": "man",
        "summary": "mesg - display (or do not display) messages from other users",
        "synopsis": "mesg [option] [n|y]",
        "tldr_summary": "Check or set a terminal's ability to receive messages from other users, usually from the `write` command.",
        "tldr_examples": [
            {
                "description": "Check terminal's openness to write messages",
                "command": "mesg"
            },
            {
                "description": "Disallow receiving messages from the write command",
                "command": "mesg n"
            },
            {
                "description": "Allow receiving messages from the write command",
                "command": "mesg y"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "Explain what is being done."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Display version information and exit."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Display help text and exit."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "login",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/login/1/json"
            },
            {
                "name": "talk",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/talk/1/json"
            },
            {
                "name": "write",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/write/1/json"
            },
            {
                "name": "wall",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/wall/1/json"
            },
            {
                "name": "xterm",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/xterm/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "ARGUMENTS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-v --verbose",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-V --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    },
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    }
                ]
            },
            {
                "name": "EXIT STATUS",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "HISTORY",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AVAILABILITY",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "mesg - display (or do not display) messages from other users\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "mesg [option] [n|y]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The mesg utility is invoked by a user to control write access others have to the terminal\ndevice associated with standard error output. If write access is allowed, then programs such\nas talk(1) and write(1) may display messages on the terminal.\n\nTraditionally, write access is allowed by default. However, as users become more conscious of\nvarious security risks, there is a trend to remove write access by default, at least for the\nprimary login shell. To make sure your ttys are set the way you want them to be set, mesg\nshould be executed in your login scripts.\n\nThe mesg utility silently exits with error status 2 if not executed on terminal. In this case\nexecute mesg is pointless. The command line option --verbose forces mesg to print a warning\nin this situation. This behaviour has been introduced in version 2.33.\n",
                "subsections": []
            },
            "ARGUMENTS": {
                "content": "n\nDisallow messages.\n\ny\nAllow messages to be displayed.\n\nIf no arguments are given, mesg shows the current message status on standard error output.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-v --verbose",
                        "content": "Explain what is being done.\n",
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-V --version",
                        "content": "Display version information and exit.\n",
                        "flag": "-V",
                        "long": "--version"
                    },
                    {
                        "name": "-h --help",
                        "content": "Display help text and exit.\n",
                        "flag": "-h",
                        "long": "--help"
                    }
                ]
            },
            "EXIT STATUS": {
                "content": "The mesg utility exits with one of the following values:\n\n0\nMessages are allowed.\n\n1\nMessages are not allowed.\n\n>1\nAn error has occurred.\n",
                "subsections": []
            },
            "FILES": {
                "content": "/dev/[pt]ty[pq]?\n",
                "subsections": []
            },
            "HISTORY": {
                "content": "A mesg command appeared in Version 6 AT&T UNIX.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "login(1), talk(1), write(1), wall(1), xterm(1)\n",
                "subsections": []
            },
            "REPORTING BUGS": {
                "content": "For bug reports, use the issue tracker at https://github.com/karelzak/util-linux/issues.\n",
                "subsections": []
            },
            "AVAILABILITY": {
                "content": "The mesg command is part of the util-linux package which can be downloaded from Linux Kernel\nArchive <https://www.kernel.org/pub/linux/utils/util-linux/>.\n\n\n\nutil-linux 2.37.2                            2021-06-02                                      MESG(1)",
                "subsections": []
            }
        }
    }
}