]> git.ipfire.org Git - thirdparty/util-linux.git/blame - term-utils/mesg.1.adoc
Merge branch 'PR/fdisk-trim' of github.com:karelzak/util-linux-work
[thirdparty/util-linux.git] / term-utils / mesg.1.adoc
CommitLineData
295b3979 1//po4a: entry man manual
6cac37e3
MB
2////
3Copyright (c) 1987, 1990, 1993
4 The Regents of the University of California. All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions
8are met:
91. Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
112. Redistributions in binary form must reproduce the above copyright
12 notice, this list of conditions and the following disclaimer in the
13 documentation and/or other materials provided with the distribution.
143. All advertising materials mentioning features or use of this software
15 must display the following acknowledgement:
16 This product includes software developed by the University of
17 California, Berkeley and its contributors.
184. Neither the name of the University nor the names of its contributors
19 may be used to endorse or promote products derived from this software
20 without specific prior written permission.
21
22THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32SUCH DAMAGE.
33
34 @(#)mesg.1 8.1 (Berkeley) 6/6/93
35////
36= mesg(1)
37:doctype: manpage
f42ed819 38:man manual: User Commands
6cac37e3
MB
39:man source: util-linux {release-version}
40:page-layout: base
41:command: mesg
42
43== NAME
44
45mesg - display (or do not display) messages from other users
46
47== SYNOPSIS
48
49*mesg* [_option_] [*n*|*y*]
50
51== DESCRIPTION
52
53The *mesg* utility is invoked by a user to control write access others have to the terminal device associated with standard error output. If write access is allowed, then programs such as *talk*(1) and *write*(1) may display messages on the terminal.
54
55Traditionally, write access is allowed by default. However, as users become more conscious of various security risks, there is a trend to remove write access by default, at least for the primary login shell. To make sure your ttys are set the way you want them to be set, *mesg* should be executed in your login scripts.
56
03a8f430 57The *mesg* utility silently exits with error status 2 if not executed on a terminal. In this case executing *mesg* is pointless. The command line option *--verbose* forces *mesg* to print a warning in this situation. This behaviour has been introduced in version 2.33.
6cac37e3
MB
58
59== ARGUMENTS
60
61*n*::
28f4f1a3 62Disallow messages.
6cac37e3
MB
63
64*y*::
28f4f1a3 65Allow messages to be displayed.
6cac37e3
MB
66
67If no arguments are given, *mesg* shows the current message status on standard error output.
68
69== OPTIONS
70
71*-v*, *--verbose*::
28f4f1a3 72Explain what is being done.
6cac37e3 73
2b2d3172 74include::man-common/help-version.adoc[]
6cac37e3
MB
75
76== EXIT STATUS
77
78The *mesg* utility exits with one of the following values:
79
6cac37e3 80*0*::
28f4f1a3 81Messages are allowed.
6cac37e3 82*1*::
28f4f1a3 83Messages are not allowed.
6cac37e3 84*>1*::
28f4f1a3 85An error has occurred.
6cac37e3
MB
86
87== FILES
88
03a8f430 89_/dev/[pt]ty*_, _/dev/pts/[0-9]*_
6cac37e3
MB
90
91== HISTORY
92
03a8f430 93*mesg* (I) appears in the UNIX Programmer's Manual.
94It used to invert the current state with no argument before Version 7 AT&T UNIX.
6cac37e3
MB
95
96== SEE ALSO
97
98*login*(1),
99*talk*(1),
100*write*(1),
101*wall*(1),
102*xterm*(1)
103
625e9c61 104include::man-common/bugreports.adoc[]
6cac37e3 105
625e9c61 106include::man-common/footer.adoc[]
6cac37e3
MB
107
108ifdef::translation[]
625e9c61 109include::man-common/translation.adoc[]
6cac37e3 110endif::[]