who command show that xyz user is on tty2.

$ who
xyz tty2         2018-06-22 08:18 (:0)

I trying send message to xyz using write xyz command. But it does not shows on terminal.

When I run tty command on xyz user terminal.

$ tty

but write says user is not logged in on pts/1

$ write xyz pts/1
write: xyz is not logged in on pts/1

According to this reddit, in Debian Stretch Login session is usually on tty2.

So I think message is being sent to xyz user terminal, but since login session is open on that tty. It is not being displayed.

How can write message to opened terminal of xyz on debian stretch.


1 Answer 1


write uses utmp to determine who is logged in. an x-terminal does not count as a log-in only a connection that was mediated by /bin/login (or similar)

so ssh into localhost, get the new tty and try write again.

  • 1
    Already very helpful but I think it would be more helpful if you could supply any source.
    – ynn
    Jul 14, 2020 at 5:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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