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  the  current
24       standard  error  output  does  not refer to the terminal.  In this case
25       execute mesg is pointless.  The command line  option  --verbose  forces
26       mesg  to  print  a  warning in this situation.  This behaviour has been
27       introduced in version 2.33.
28

ARGUMENTS

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

OPTIONS

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

EXIT STATUS

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

FILES

57       /dev/[pt]ty[pq]?
58

SEE ALSO

60       login(1), talk(1), write(1), wall(1), xterm(1)
61

HISTORY

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

AVAILABILITY

67       The  mesg  command  is  part of the util-linux package and is available
68       from https://www.kernel.org/pub/linux/utils/util-linux/.
69
70
71
72util-linux                         July 2014                           MESG(1)
Impressum