Mesg

Unix command


title: "Mesg" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["unix-user-management-and-support-related-utilities", "unix-sus2008-utilities"] description: "Unix command" topic_path: "technology/operating-systems" source: "https://en.wikipedia.org/wiki/Mesg" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

::summary Unix command ::

::data[format=table title="Infobox software"]

FieldValue
namemesg
authorDennis Ritchie,
Ken Thompson
developerAT&T Bell Laboratories
released
operating systemUnix and Unix-like
genreCommand
::

| name = mesg | logo = | screenshot = | screenshot size = | caption = | author = Dennis Ritchie, Ken Thompson | developer = AT&T Bell Laboratories | released = | latest release version = | latest release date = | operating system = Unix and Unix-like | genre = Command | license = | website = **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](talk-software) and [write](write-unix) commands.

Usage

It is invoked as:

::code[lang=bash] 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:

::code[lang=console] % mesg is y % tty /dev/tty1 % mesg < /dev/tty2 is y % mesg n < /dev/tty2 % mesg < /dev/tty2 is n % mesg is y ::

References

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

unix-user-management-and-support-related-utilitiesunix-sus2008-utilities