I have a user of name x in tty1 and y in tty2. Now x wants to write some message to y and vice-versa. Now I typed in tty1 terminal write y tty2 It is showing

write:write:you have write permission turned off

write:y has messages disabled

Same thing is showing when y's sending message to x instead it is 'x' in the last line. What should I do?

4 Answers 4


It seems that y has turned off messages.

In y's terminal, type:

$ mesg
is n

meaning y does not allow others to write to y's terminal. Then you should try:

$ mesg y


This option y in above command is different with y user in your case.

From man mesg:

       mesg - control write access to your terminal

       mesg [y|n]

       Mesg  controls the access to your terminal by others.  It's typically used to allow or disallow other users to write to your terminal
       (see write(1)).

       y      Allow write access to your terminal.

       n      Disallow write access to your terminal.

       If no option is given, mesg prints out the current access state of your terminal.
  • It is showing Usage:mesg[y|n] and the prompt is coming then. Commented Jun 8, 2014 at 16:35
  • 1
    @saptarshinag: you must type mesg y <enter>. y is an option of mesg, not your user.
    – cuonglm
    Commented Jun 8, 2014 at 16:37
  • Oh i see,sorry for my mistake Commented Jun 8, 2014 at 16:46
  • It works! but after logout and again logging in one of the terminal the first message is still showing,i.e,write:write:you have write permission turned off...it is working though.Thanks! Commented Jun 8, 2014 at 16:53
  • @saptarshinag: Becasue in your system, message is not turn on by default. What is your OS?
    – cuonglm
    Commented Jun 8, 2014 at 17:24

If X is the usr who wants to pop a message on y machine. Fisrt take the terminal id of y machine and both should be on the same host. you can send a message like below.

  1. Type who command and see the terminal id of y machine( for example pty/1 is the terminal ID of y)
  2. echo "Hello" 1> pty/1(this will display the message on y machine.
  • Y had to set the full path: echo "Hi" 1> /dev/pts/1
    – Pablo A
    Commented Nov 4, 2022 at 1:54

You cannot do anything (unless you are the root user).

Each user can enable/disable other users ability to send messages to them using the command mesg. This command can be put into your .bashrc or .login file (depending on shell).

The default if you do nothing is to protect the user from these interrupting messages from other users.

> $ who
bouba    :0           2015-07-30 07:10 (:0)
jdone    pts/1        2015-07-30 20:07
bouba    pts/12       2015-07-30 20:39 (:0)
> $ mesg y
> $ write jdone

jdone its your userName and here type your message and press Entre To send

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .