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.
- Description
- Syntax
- Examples
- Related commands
- Linux commands help
Syntax
mesg [n|y]
Options
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.