Mesg

mesg

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 and write commands.

Quick Facts Original author(s), Developer(s) ...

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:

% mesg
is y
% tty
/dev/tty1
% mesg < /dev/tty2
is y
% mesg n < /dev/tty2
% mesg < /dev/tty2
is n
% mesg
is y

See also

References


Share this article:

This article uses material from the Wikipedia article Mesg, and is written by contributors. Text is available under a CC BY-SA 4.0 International License; additional terms may apply. Images, videos and audio are available under their respective licenses.