Linux mesg command
Updated: 05/04/2019 by Computer Hope
On Unix-like operating systems, the mesg command allows you control write access to your terminal by other users.
This page covers the Linux version of mesg.
Description
The write command allows other users to send a message to your terminal session; the mesg command is used to toggle these messages on or off.
Syntax
mesg [n|y]
Options
n | Prevents the display of terminal messages from other users. This option is like using a "do not disturb" sign. |
y | Allows messages to display on your screen. |
If no option is given, mesg displays the current access state of your terminal.
Examples
mesg y
Allow other users to send you messages.
mesg n
Disallow other users from being able to send you messages.
mesg
Display the current write status of your terminal.
Related commands
talk — Talk with other logged in users.
wall — Send a message to all logged-in users.
write — Send a message to another user.