1MESG(1)                          User Commands                         MESG(1)
2
3
4

NAME

6       mesg - display (or do not display) messages from other users
7

SYNOPSIS

9       mesg [option] [n|y]
10

DESCRIPTION

12       The mesg utility is invoked by a user to control write access others
13       have to the terminal device associated with standard error output. If
14       write access is allowed, then programs such as talk(1) and write(1) may
15       display messages on the terminal.
16
17       Traditionally, write access is allowed by default. However, as users
18       become more conscious of various security risks, there is a trend to
19       remove write access by default, at least for the primary login shell.
20       To make sure your ttys are set the way you want them to be set, mesg
21       should be executed in your login scripts.
22
23       The mesg utility silently exits with error status 2 if not executed on
24       terminal. In this case execute mesg is pointless. The command line
25       option --verbose forces mesg to print a warning in this situation. This
26       behaviour has been introduced in version 2.33.
27

ARGUMENTS

29       n
30           Disallow messages.
31
32       y
33           Allow messages to be displayed.
34
35       If no arguments are given, mesg shows the current message status on
36       standard error output.
37

OPTIONS

39       -v, --verbose
40           Explain what is being done.
41
42       -V, --version
43           Display version information and exit.
44
45       -h, --help
46           Display help text and exit.
47

EXIT STATUS

49       The mesg utility exits with one of the following values:
50
51       0
52           Messages are allowed.
53
54       1
55           Messages are not allowed.
56
57       >1
58           An error has occurred.
59

FILES

61       /dev/[pt]ty[pq]?
62

HISTORY

64       A mesg command appeared in Version 6 AT&T UNIX.
65

SEE ALSO

67       login(1), talk(1), write(1), wall(1), xterm(1)
68

REPORTING BUGS

70       For bug reports, use the issue tracker at
71       https://github.com/karelzak/util-linux/issues.
72

AVAILABILITY

74       The mesg command is part of the util-linux package which can be
75       downloaded from Linux Kernel Archive
76       <https://www.kernel.org/pub/linux/utils/util-linux/>.
77
78
79
80util-linux 2.37.2                 2021-06-02                           MESG(1)
Impressum