You are here: >

Linux and Unix mesg command

mesg commandAbout mesg
mesg syntax
mesg examples
Related commands
Linux and Unix main page

About mesg

The mesg command allows you control write access to your terminal by other users.


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 syntax

mesg [n|y]


n Prevents the display of terminal messages from other users. This is like using a "do not disturb" sign.
y Allows messages to be displayed on your screen.

If no option is given, mesg displays the current access state of your terminal.

mesg examples

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.