Linux mesg command

Updated: 05/04/2019 by Computer Hope
mesg command

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.


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.


mesg [n|y]


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.


mesg y

Allow other users to send you messages.

mesg n

Disallow other users from being able to send you messages.


Display the current write status of your terminal.

talk — Talk with other logged in users.
wall — Send a message to all logged-in users.
write — Send a message to another user.