.\"
.\" @(#)mesg.1 8.1 (Berkeley) 6/6/93
.\"
-.\" Fri Mar 10 20:31:02 1995, modified for standard man macros,
-.\" faith@cs.unc.edu
-.\"
-.\"
-.\" "
-.TH MESG 1 "10 March 1995" "Linux 1.2" "Linux Programmer's Manual"
+.TH MESG 1 "July 2014" "util-linux" "User Commands"
.SH NAME
-mesg \- display (do not display) messages from other users
+mesg \- display (or do not display) messages from other users
.SH SYNOPSIS
.B mesg
+[option]
.RB [ n | y ]
.SH DESCRIPTION
The
.B mesg
-utility is invoked by a users to control write access others have to the
-terminal device associated with the standard error output. If write access
+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
.BR talk (1)
and
.B mesg
should be executed in your login scripts.
.PP
-Options available:
+The
+.B mesg
+utility silently exits with error status 2 if the current standard error output does
+not refer to the terminal. In this case execute
+.B mesg
+is pointless. The command line option \fB\-\-verbose\fR forces
+mesg to print a warning in this situation. This behaviour has been introduced
+in version 2.33.
+.SH ARGUMENTS
.TP
.B n
-Disallows messages.
+Disallow messages.
.TP
.B y
-Permits messages to be displayed.
+Allow messages to be displayed.
.PP
If no arguments are given,
.B mesg
-displays the present message status to the standard error output.
-.PP
+shows the current message status on standard error output.
+.SH OPTIONS
+.TP
+.BR \-v , " \-\-verbose"
+Explain what is being done.
+.TP
+.BR \-V , " \-\-version"
+Display version information and exit.
+.TP
+.BR \-h , " \-\-help"
+Display help text and exit.
+.SH EXIT STATUS
The
.B mesg
utility exits with one of the following values:
+.RS 4
.TP
-.I "\ 0"
+.B "\ 0"
Messages are allowed.
.TP
-.I "\ 1"
+.B "\ 1"
Messages are not allowed.
.TP
-.I "\>1"
+.B ">1"
An error has occurred.
+.RE
.SH FILES
.I /dev/[pt]ty[pq]?
.SH "SEE ALSO"
-.BR biff (1),
+.BR login (1),
.BR talk (1),
.BR write (1),
.BR wall (1),
-.BR login (1),
.BR xterm (1)
.SH HISTORY
A
.SH AVAILABILITY
The mesg command is part of the util-linux package and is available from
-ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
+https://www.kernel.org/pub/linux/utils/util-linux/.