mesg explained

mesg
Author:Dennis Ritchie,
Ken Thompson
Developer:AT&T Bell Laboratories
Operating System:Unix and Unix-like
Genre:Command

'''mesg''' is a Unix command that sets or reports the permission other users have to write to the current user's terminal using the [[Talk (software)|talk]] and [[Write (Unix)|write]] commands.

Usage

It is invoked as:

mesg [y|n]

The 'y' and 'n' options respectively allow and disallow write access to the current user's terminal. When invoked with no option, the current permission is printed.

Input redirection may be used to control the permission of another TTY. For example:

% mesgis y% tty/dev/tty1% mesg < /dev/tty2is y% mesg n < /dev/tty2% mesg < /dev/tty2is n% mesgis y

See also