Transfered from Linux Config:

Question:
What command prevents other users from sending you messages? How do you reset the variable to allow messages once again?
Answer:
To stop other to send you a local message using your terminal use mesg command. The syntax is simple as :
Code:
mesg y
to allow others to access your terminal thus writing you a message where
Code:
mesg n
does the exact opposite.

You can view your current mesg settings by executing the mesg command without any arguments and options:
Code:
dmesg