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.
26       This behaviour has been introduced in version 2.33.
27

ARGUMENTS

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

OPTIONS

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

EXIT STATUS

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

FILES

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

HISTORY

59       A mesg command appeared in Version 6 AT&T UNIX.
60
61

SEE ALSO

63       login(1), talk(1), write(1), wall(1), xterm(1)
64

AVAILABILITY

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