Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 10 down vote accepted

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.
share|improve this answer
It is showing Usage:mesg[y|n] and the prompt is coming then. – saptarshi nag Jun 8 '14 at 16:35
@saptarshinag: you must type mesg y <enter>. y is an option of mesg, not your user. – cuonglm Jun 8 '14 at 16:37
Oh i see,sorry for my mistake – saptarshi nag Jun 8 '14 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! – saptarshi nag Jun 8 '14 at 16:53
@saptarshinag: Becasue in your system, message is not turn on by default. What is your OS? – cuonglm Jun 8 '14 at 17:24

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.

share|improve this answer

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.
share|improve this answer
> $ 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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.